Inherits from CCActionFiniteTime : CCAction : NSObject
Conforms to NSCopying
Declared in CCActionInterval.h

Overview

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 = [CCActionSequence actions: action, [action reverse], nil];

Tasks

Other Methods

Creating a CCActionInterval Object

Initializing a CCActionInterval Object

CCActionInterval Management

Properties

elapsed

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

@property (nonatomic, readonly) CCTime elapsed

Declared In

CCActionInterval.h

Class Methods

actionWithDuration:

Creates and returns an action interval object.

+ (id)actionWithDuration:(CCTime)d

Parameters

d

Action interval.

Return Value

The CCActionInterval object.

Declared In

CCActionInterval.h

Instance Methods

initWithDuration:

Initializes and returns an action interval object.

- (id)initWithDuration:(CCTime)d

Parameters

d

Action interval.

Return Value

An initialized CCActionInterval Object.

Declared In

CCActionInterval.h

isDone

Returns YES if the action has finished.

- (BOOL)isDone

Return Value

Action finished status.

Declared In

CCActionInterval.h

reverse

Returns a reversed action.

- (CCActionInterval *)reverse

Return Value

Created reversed action.

Declared In

CCActionInterval.h