I want to do:
id action = [CCScaleTo actionWithDuration:0.5 scaleX:self.Xposition scaleY:1];
id ease = [CCEaseInOut actionWithAction:action rate:4];
[someObject[i] runAction:ease];
But I want to be able to hook into each frame of the action to do some stuff… I am wondering if there is any way to accomplish this other than creating an update method on someObject? I am trying to avoid doing that because it’s a CCSprite, and I don’t currently have an object wrapper for it.. It literally is just defined as something like CCSprite *someObject[4] in the header… So I just wondered if there is any way to specify a per-frame callback in the context of runAction?
There is no native way to do this.
If this is what you really want to do rather than using an update method you could create a class similar to how the Ease actions work. Taking another action as a parameter and overriding update to modify its behavior.
For example if you called it CCCallBackAction it would be created as follows:
In CCCallBackAction you would override update
Note to avoid misunderstanding: CCCallBackAction is not a cocos2d class, it is hypothetical in this example