cocos2d-iphone  1.0.1
Improved Cocos2D API Reference (iOS version) for Kobold2D developers
CCActionInterval Interface Reference

#include <CCActionInterval.h>

+ Inheritance diagram for CCActionInterval:
+ Collaboration diagram for CCActionInterval:

List of all members.

Public Member Functions

id initWithDuration: (ccTime d)
BOOL isDone ()
CCActionIntervalreverse ()

Static Public Member Functions

id actionWithDuration: (ccTime d)

Protected Attributes

ccTime elapsed_
BOOL firstTick_

Properties

ccTime elapsed

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


Member Function Documentation

id CCActionInterval::actionWithDuration: ( ccTime  d) [static, virtual]

creates the action

Implemented in CCFlipX3D.

id CCActionInterval::initWithDuration: ( ccTime  d) [virtual]

initializes the action

Implemented in CCFlipX3D.

BOOL CCActionInterval::isDone ( ) [virtual]

returns YES if the action has finished

Implements CCAction.

CCActionInterval* CCActionInterval::reverse ( ) [virtual]

returns a reversed action

Implements CCFiniteTimeAction.


Property Documentation

ccTime CCActionInterval::elapsed [read, assign]

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


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