I spent a day trying to hack my own Action class, but given the hurdles I've hit trying to do so, I'm hoping there's some way to work around my problem while still using the built-in (and admittedly powerful) Action class.
To wit, I need to check collision on a linear movement type Action (like MoveTo). It appears the function simply calculates a vector and increases the Node's position on that vector as time elapses. All fine.
Now, I have a collisionHandler function set up within both my Player class and my custom Move class. However, cocos2d automatically schedules actions when they're added to a Node using the runAction method. Because of this, it seems that the collisionHandler never gets called on the Move class. The code, as I imagine it updates, looks like this:
Main{ //main loop
objects->update();
collisionManager->update();
} // all other cocos2d scheduled updates
actions->update(); // the collision doesn't get checked til next frame
Running the collision loop twice per frame must be the wrong answer. So, how do I get it so that both the objects and their actions update before the collision loop runs?