CCIntervalAction Class Reference
Inherits from | CCFiniteTimeAction : CCAction : NSObject |
Conforms to | NSCopying |
Declared in | CCIntervalAction.h |
Overview
An interval action is an action that takes place within a certain period of time. It has an start time, and a finish time. The finish time is the parameter duration plus the start time.
These CCIntervalAction actions have some interesting properties, like: – They can run normally (default) – They can run reversed with the reverse method – They can run with the time altered with the Accelerate, AccelDeccel and Speed actions.
For example, you can simulate a Ping Pong effect running the action normally and then running it again in Reverse mode.
Example:
CCAction * pingPongAction = [CCSequence actions: action, [action reverse], nil];
Tasks
-
elapsed
how many seconds had elapsed since the actions started to run.
property -
+ actionWithDuration:
creates the action
-
– initWithDuration:
initializes the action
-
– isDone
returns YES if the action has finished
-
– reverse
returns a reversed action