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

#import <CCActionInterval.h>

Inheritance diagram for CCActionInterval:
Collaboration diagram for CCActionInterval:

Instance Methods

(id) - initWithDuration:
 
(BOOL) - isDone
 
(CCActionInterval *) - reverse
 

Class Methods

(id) + actionWithDuration:
 

Protected Attributes

ccTime _elapsed
 
BOOL _firstTick
 
 Protected Attributes inherited from CCFiniteTimeAction
ccTime _duration
 duration in seconds More...
 
 Protected Attributes inherited from CCAction
id _originalTarget
 
id _target
 
NSInteger _tag
 

Properties

ccTime elapsed
 
 Properties inherited from CCFiniteTimeAction
ccTime duration
 duration in seconds of the action More...
 
 Properties inherited from CCAction
id target
 
id originalTarget
 
NSInteger tag
 

Detailed Description

An interval action is an action that takes place within a certain period of time. It has an start time, and a finish time. The finish time is the parameter duration plus the start time.

These CCActionInterval actions have some interesting properties, like:

  • They can run normally (default)
  • They can run reversed with the reverse method
  • They can run with the time altered with the Accelerate, AccelDeccel and Speed actions.

For example, you can simulate a Ping Pong effect running the action normally and then running it again in Reverse mode.

Example:

CCAction * pingPongAction = [CCSequence actions: action, [action reverse], nil];

Method Documentation

+ (id) actionWithDuration: (ccTime d

creates the action

Implemented in CCFlipX3D.

- (id) initWithDuration: (ccTime d

initializes the action

Implemented in CCFlipX3D.

- (BOOL) isDone

returns YES if the action has finished

Implements CCAction.

- (CCActionInterval*) reverse

returns a reversed action

Implements CCFiniteTimeAction.

Property Documentation

- (ccTime) elapsed
readnonatomicassign

how many seconds had elapsed since the actions started to run.


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