CallFunc is an Action that lets you do callbacks after your action. Something like
auto seq = Sequence::create(MoveTo(1.0f, Vec(200, 350)), CallFunc::create(func));
That’ll move the node my_node, and then call func right after.
If you have the same Scene on the Director’s Scene stack, either by runWithScene or with pushScene, if you pop one off, it’ll call release on it, and effectively destroy it, making any further operations on the Scene impossible.
To resolve this, you need to call retain() on the scene, to tell cocos that somewhere else is using the scene.
If you’ve got a `Sequence` running on one Node, with a `TargetedAction` pointing at another Node, calling `stopAllActions` on that other Node won’t have any effect, because the Sequence’s target is still the first Node.
If you add a Sprite to a NodeGrid, but change the GlobalZOrder of the Sprite to something higher than the NodeGrid, the effect running on the NodeGrid won’t affect the Sprite, despite being a child of the NodeGrid getting the action running on it.
If you run an Effect, by creating a NodeGrid, and then adding a sprite or something to it, and then each frame, you keep calling runAction on it with a new Effect, it’ll never start, because each action is constantly getting replaced.
To solve this, I added a boolean flag on the object to see if an effect was running or not, and then only ran the effect if the flag was false.