想要在animation播放完毕后,释放node:
var animation = node.getComponent(cc.Animation);
animation.play();
animation.once("stop", function(){
if(node.isValid)
node.destroy();
});
这样子可以吗?
如果animation播放完毕之前,调用了node.destroy(),那animation本身会被destroy吗?
如果animation播放完毕之前被destroy了,上面这个callback还会被调用吗?