![]() |
cocos2d-iphone
1.0.1
Improved Cocos2D API Reference (iOS version) for Kobold2D developers
|
#include <CCAction.h>
Public Member Functions | |
id | init () |
id | copyWithZone: (NSZone *zone) |
BOOL | isDone () |
return YES if the action has finished | |
void | startWithTarget: (id target) |
called before the action start. It will also set the target. | |
void | stop () |
void | step: (ccTime dt) |
called every frame with it's delta time. DON'T override unless you know what you are doing. | |
void | update: (ccTime time) |
Static Public Member Functions | |
id | action () |
Protected Attributes | |
id | originalTarget_ |
id | target_ |
NSInteger | tag_ |
Properties | |
id | target |
id | originalTarget |
NSInteger | tag |
Base class for CCAction objects.
id CCAction::action | ( | ) | [static, virtual] |
Allocates and initializes the action
id CCAction::init | ( | ) | [virtual] |
Initializes the action
BOOL CCAction::isDone | ( | ) | [virtual] |
return YES if the action has finished
Implemented in CCActionInterval.
void CCAction::startWithTarget: | ( | id | target | ) | [virtual] |
called before the action start. It will also set the target.
void CCAction::step: | ( | ccTime | dt | ) | [virtual] |
called every frame with it's delta time. DON'T override unless you know what you are doing.
void CCAction::stop | ( | ) | [virtual] |
called after the action has finished. It will set the 'target' to nil. IMPORTANT: You should never call "[action stop]" manually. Instead, use: "[target stopAction:action];"
void CCAction::update: | ( | ccTime | time | ) | [virtual] |
called once per frame. time a value between 0 and 1 For example: 0 means that the action just started 0.5 means that the action is in the middle 1 means that the action is over
id CCAction::originalTarget [read, assign] |
The original target, since target can be nil. Is the target that were used to run the action. Unless you are doing something complex, like CCActionManager, you should NOT call this method.
NSInteger CCAction::tag [read, write, assign] |
The action tag. An identifier of the action
id CCAction::target [read, assign] |
The "target". The action will modify the target properties. The target will be set with the 'startWithTarget' method. When the 'stop' method is called, target will be set to nil. The target is 'assigned', it is not 'retained'.