cocos2d-iphone  2.1
Improved Cocos2D API Reference (iOS version) for www.kobold2d.com developers
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Defines
CCActionInterval Class Reference

#import <CCActionInterval.h>

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

List of all members.

Public Member Functions

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

Static Public Member Functions

(id) + actionWithDuration:

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

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.

returns a reversed action

Implements CCFiniteTimeAction.


Property Documentation

- (ccTime) elapsed [read, assign]

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


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