CCRepeat. Repeat a number of SECONDS the sequence.

CCRepeat. Repeat a number of SECONDS the sequence.
0.0 0



I have a fadein/out sequence which creates a soft blink. Now I want this blink to become more frequent over time. So I need a CCRepeat action with a parameter in senconds and then apply a CCEaseIn to this action. But I don’t find any class with this behaviour.

Could you help me?

Thank you!


mmm not sure if this helps but you could create a CCSequence first with fadeout - fadein - callback. in the callback you cast again the same action on the same object, but this time you set the duration of the action decreased… what do you think :)?


You can calculate duration of all actions in sequence and then multiply it with how many times you want to repeat and run another action on Sprite like:

sprite->runAction(CCSequence::create(CCDelayTime::create(totalduration * repeat), CCRemoveSelf::create() , NULL));