cocos2d-mac  2.1
Improved Cocos2D API Reference (Mac OS X version) for www.kobold2d.com developers
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Defines
CCAction Class Reference

#import <CCAction.h>

Inheritance diagram for CCAction:

List of all members.

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

Detailed Description

Base class for CCAction objects.


Member Function Documentation

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

- (void) step: (ccTime dt

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];"

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

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.


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


The documentation for this class was generated from the following file: