解决cocos2dx调用removeFromParent后报错问题
原因:cocos2dx的bug
解决办法:
放到action中,前面添加一个DelayTime延迟,代码如下
this->runAction(Sequence::create(DelayTime::create(0.1f),CallFuncN::create([&](Node* pNode){pNode->removeFromParent();}),NULL));
read the fucking source code
原因:cocos2dx的bug
解决办法:
放到action中,前面添加一个DelayTime延迟,代码如下
this->runAction(Sequence::create(DelayTime::create(0.1f),CallFuncN::create([&](Node* pNode){pNode->removeFromParent();}),NULL));