CCAction Class Reference
| Inherits from | NSObject |
| Conforms to | NSCopying |
| Declared in | CCAction.h |
Overview
CCAction forms the foundation for one the great areas of Cocos2D functionality. The manipulatinon of node properties such as position, rotation, scale and opacity over time, to create fun effects.
- Actions can be modified with easing actions to create more realistic animations.
- Actions can be put in sequence to create more complex animation sequences.
Tasks
Accessing Action Attributes
-
targetproperty -
originalTargetproperty -
tagproperty
Creating a CCAction Object
Initializing a CCAction Object
Action Management
Properties
originalTarget
@property (nonatomic, readonly, unsafe_unretained) id originalTargetDeclared In
CCAction.htarget
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’.
@property (nonatomic, readonly, unsafe_unretained) id targetDeclared In
CCAction.hInstance Methods
init
Initializes and returns an action object.
- (id)initReturn Value
An initialized CCAction Object.
Declared In
CCAction.hisDone
Return YES if the action has finished.
- (BOOL)isDoneReturn Value
Action completion status
Declared In
CCAction.hstartWithTarget:
- (void)startWithTarget:(id)targetParameters
- target
Target to assign to action (weak reference).
Declared In
CCAction.hstep:
Steps the action. Called for every frame with step interval.
- (void)step:(CCTime)dtParameters
- dt
Ellapsed interval since last step.
Discussion
Note: Do not override unless you know what you are doing.
Declared In
CCAction.h