![]() |
cocos2d-iphone
1.0.1
Improved Cocos2D API Reference (iOS version) for Kobold2D developers
|
#include <CCActionInterval.h>
Public Member Functions | |
id | initWithDuration: (ccTime d) |
BOOL | isDone () |
CCActionInterval * | reverse () |
Static Public Member Functions | |
id | actionWithDuration: (ccTime d) |
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 CCActionInterval::actionWithDuration: | ( | ccTime | d | ) | [static, virtual] |
creates the action
Implemented in CCFlipX3D.
id CCActionInterval::initWithDuration: | ( | ccTime | d | ) | [virtual] |
initializes the action
Implemented in CCFlipX3D.
BOOL CCActionInterval::isDone | ( | ) | [virtual] |
returns YES if the action has finished
Implements CCAction.
CCActionInterval* CCActionInterval::reverse | ( | ) | [virtual] |
returns a reversed action
Implements CCFiniteTimeAction.
ccTime CCActionInterval::elapsed [read, assign] |
how many seconds had elapsed since the actions started to run.