Using cocos2d, how can I achieve a pulse animation using actions.
I know I'll need CCScaleTo and probably CCRepeat, but I don't know how to put them together.
Just for the sake of completeness in addition to James' spot on answer above, you need to call the method [runAction ...] on your CCNode object and pass it the action - That is, the code provided by James as is.
To stop the pulsating effect, you can call [stopAllActions ...] on your CCNode.
Best,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With