IntervalAction Class Reference

#import <IntervalAction.h>

Inherits FiniteTimeAction.

Inherited by AccelAmplitude, AccelDeccelAmplitude, Animate, BezierBy, Blink, CameraAction, DeccelAmplitude, DelayTime, EaseAction, FadeIn, FadeOut, FadeTo, GridAction, JumpBy, MoveTo, Repeat, ReverseTime, RotateBy, RotateTo, ScaleTo, Sequence, Spawn, TintBy, and TintTo.

Collaboration diagram for IntervalAction:

Collaboration graph
[legend]

List of all members.

Public Member Functions

(id) - initWithDuration:
(void) - start
(BOOL) - isDone
(IntervalAction *) - reverse

Static Public Member Functions

(id) + actionWithDuration:


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 IntervalAction actions have some interesting properties, like:

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

Example:

Action * pingPongAction = [Sequence actions: action, [action reverse], nil];


Member Function Documentation

+ (id) actionWithDuration: (ccTime d  

creates the action

Implemented in FlipX3D.

- (id) initWithDuration: (ccTime d  

initializes the action

Implemented in FlipX3D.

- (BOOL) isDone  

returns YES if the action has finished

Implements Action.

- (IntervalAction*) reverse  

returns a reversed action

Implements FiniteTimeAction.

- (void) start  

called when the action is about to start

Implements Action.


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

Generated on Tue Jun 9 10:39:38 2009 for cocos2d for iPhone 0.7.3 by  doxygen 1.5.8