|
cocos2d-mac
2.1
Improved Cocos2D API Reference (Mac OS X version) for www.koboldtouch.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 More... | |
| 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 More... | |
| 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.