[]为啥我在批量removeself 会报错卡死


override public function removeSelf():Node {
this.scaleX = 1;
this.scaleY = 1;
this.alpha = 1;
this.pos(0,0);
this.filters = [];
if(selectImg != null)
{
selectImg.removeSelf();
}
this.mouseEnabled = true;
if(this.visible == false)
{
this.visible = true;
}
super.removeSelf();
if(itemCountTx != null)
{
itemCountTx.removeSelf();
}
return this;
}
 
已邀请:

ymsdandan

赞同来自:

removeself是从父节点删除自己,所以如果你要批量删除的话只能采用递归来删除

要回复问题请先

商务合作
商务合作