Public Member Functions | Static Public Member Functions | Properties

CCAction Class Reference

#import <CCAction.h>

Inherited by CCFiniteTimeAction, CCFollow, CCRepeatForever, and CCSpeed.

List of all members.

Public Member Functions

(id) - init
(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 it's delta time. DON'T override unless you know what you are doing.
(void) - update:

Static Public Member Functions

(id) + action

Properties

id target
id originalTarget
int tag

Detailed Description

Base class for CCAction objects.

Definition at line 39 of file CCAction.h.


Member Function Documentation

+ (id) action  

Allocates and initializes the action

- (id) init  

Initializes the action

- (BOOL) isDone  

return YES if the action has finished

Implemented in CCIntervalAction.

- (void) startWithTarget: (id)  target  

called before the action start. It will also set the target.

- (void) step: (ccTime dt  

called every frame with it's 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];"

- (void) update: (ccTime time  

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


Property Documentation

- (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 ActionManager, you should NOT call this method.

Since:
v0.8.2

Definition at line 40 of file CCAction.h.

- (int) tag [read, write, assign]

The action tag. An identifier of the action

Definition at line 42 of file CCAction.h.

- (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'.

Definition at line 41 of file CCAction.h.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Defines

cocos2d for iPhone 0.99.4 API Reference - Generated using Doxygen 1.7.1