|
cocos2d-iphone
2.1
Improved Cocos2D API Reference (iOS version) for www.kobold2d.com developers
|
#import <CCActionInterval.h>
Instance Methods | |
| (id) | - initWithDuration: |
| (BOOL) | - isDone |
| (CCActionInterval *) | - reverse |
Class Methods | |
| (id) | + actionWithDuration: |
Protected Attributes | |
| ccTime | elapsed_ |
| BOOL | firstTick_ |
| Protected Attributes inherited from CCFiniteTimeAction | |
| ccTime | duration_ |
| duration in seconds | |
| Protected Attributes inherited from CCAction | |
| id | originalTarget_ |
| id | target_ |
| NSInteger | tag_ |
Properties | |
| ccTime | elapsed |
| Properties inherited from CCFiniteTimeAction | |
| ccTime | duration |
| duration in seconds of the action | |
| Properties inherited from CCAction | |
| id | target |
| id | originalTarget |
| NSInteger | tag |
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];
| - (BOOL) isDone |
returns YES if the action has finished
Implements CCAction.
| - (CCActionInterval*) reverse |
returns a reversed action
Implements CCFiniteTimeAction.
|
readnonatomicassign |
how many seconds had elapsed since the actions started to run.