我们重新开始的时候,敌机没有清空。
remove_all_enemy() { //清除所有敌机123 var children = this.node.children; for (let i = children.length - 1; i >= 0; i--) { if (children[i].getComponent('enemy_1')) { this.on_enemy_killed(children[i],1); }else if(children[i].getComponent('enemy_2')){ this.on_enemy_killed(children[i],2); }else if(children[i].getComponent('enemy_3')){ this.on_enemy_killed(children[i],3); } } },
站长微信:xiaomao0055
站长QQ:14496453