cocos2d for iPhone 1.0.0
2D engine for iOS and OS X
Public Member Functions | Static Public Member Functions | Properties
CCAction Class Reference

#import <CCAction.h>

Inheritance diagram for CCAction:
Inheritance graph
[legend]

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
NSInteger tag

Detailed Description

Base class for CCAction objects.

Definition at line 40 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 CCActionInterval.

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

Since:
v0.8.2

Definition at line 59 of file CCAction.h.

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

The action tag. An identifier of the action

Definition at line 63 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 53 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 API Reference - Generated using Doxygen 1.7.4