this._data = []; var sprite; for (var j=0;j<10;j++){ sprite = new Sprite(); this._data.push(sprite ); this._battleField.addChild(sprite ); } for (var i=0;i<this._data.length;i++){ this._battleField.removeChild(this._data[i]); }
芯☆淡茹水 发表于 2017-9-20 19:31
this._battleField.removeChild(sprites[j]);
添加前最好用个数组储存啊
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |