![]() |
cocos2d-mac
2.1
Improved Cocos2D API Reference (Mac OS X version) for www.kobold2d.com developers
|
#import <CCAction.h>
Public Member Functions | |
(id) | - init |
(id) | - copyWithZone: |
(BOOL) | - isDone |
return YES if the action has finished | |
(void) | - startWithTarget: |
called before the action start. It will also set the target. | |
(void) | - stop |
(void) | - step: |
called every frame with its delta time. DON'T override unless you know what you are doing. | |
(void) | - update: |
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) action |
Allocates and initializes the action
- (id) init |
Initializes the action
Implemented in CCActionInstant.
- (BOOL) isDone |
return YES if the action has finished
Implemented in CCActionInterval.
- (void) startWithTarget: | (id) | target |
called before the action start. It will also set the target.
Implemented in CCCardinalSplineBy, and CCActionCamera.
called every frame with its delta time. DON'T override unless you know what you are doing.
- (void) stop |
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];"
called once per frame. time a value between 0 and 1 For example:
Implemented in CCDelayTime, CCFadeOut, CCFadeIn, CCEaseBackInOut, CCEaseBackOut, CCEaseBackIn, CCEaseBounceInOut, CCEaseBounceOut, CCEaseBounceIn, CCEaseElasticInOut, CCEaseElasticOut, CCEaseElasticIn, CCEaseSineInOut, CCEaseSineOut, CCEaseSineIn, CCEaseExponentialInOut, CCEaseExponentialOut, CCEaseExponentialIn, CCEaseInOut, CCEaseOut, CCFlipY3D, CCEaseIn, CCToggleVisibility, CCHide, CCShow, and CCPageTurn3D.
- (id) 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) tag [read, write, assign] |
The action tag. An identifier of the action
- (id) 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'.