Detailed Description CCFiniteTimeAction cocos2d-x Reference
>
Base class actions that do have a finite time duration.
>
Possible actions:
>
An action with a duration of 0 seconds
An action with a duration of 35.5 seconds
>
Infinite time actions are valid
I don’t think that there is a CCInfiniteTimeAction class, maybe you are referring to CCFiniteTimeAction?
Anyway, if you want to repeat an action forever then use CCRepeatForever.
I want to use this function to update a value. To do this, I use a function which evaluate getElapsed() because virtual void(float time) time values < (0, 1) < . If I use RepeatForever, I get always getElapsed() = 0.
In my game, I have a function of the difficult expressed using a int.
Example:
int A = 5;
int B = 12;
int currentDifficult = A · cos(wt) + B · t;
So, the difficult at start is: A
But increased with the time. t = this->getElapsed();
I don’t know how much is during the actions, because it could take forever (The time the player is alive).
Actually, I solve the problem calling manually update this function, but I would like implemented like an Action associated to the level without use scheluders.