cocos2d-iphone
2.0
Improved Cocos2D API Reference (iOS version) for www.kobold2d.com developers
|
#import <CCActionInterval.h>
Public Member Functions | |
(id) | - initWithDuration: |
(BOOL) | - isDone |
(CCActionInterval *) | - reverse |
Static Public Member Functions | |
(id) | + actionWithDuration: |
Protected Attributes | |
ccTime | elapsed_ |
BOOL | firstTick_ |
Properties | |
ccTime | elapsed |
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 CCActionInterval actions have some interesting properties, like:
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];
+ (id) actionWithDuration: | (ccTime) | d |
creates the action
Implemented in CCFlipX3D.
- (id) initWithDuration: | (ccTime) | d |
initializes the action
Implemented in CCFlipX3D.
- (CCActionInterval*) reverse |
returns a reversed action
Implements CCFiniteTimeAction.