CCActionInterval Class Reference

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

Overview

Abstract base class for interval actions. An interval action is an action that performs its task over a certain period of time.

Most CCActionInterval actions can be reversed or have their speed altered via the CCActionSpeed action.

Moving, Rotating, Scaling a Node

Animating a Node’s Visual Properties

Repeating and Reversing Actions

Creating Sequences of Actions

Easing the Duration of an Action

Animating custom float/double Properties

  • Tweening any node property (of type float or double):

Other Methods

  elapsed

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

@property (nonatomic, readonly) CCTime elapsed

Declared In

CCActionInterval.h

Creating a Interval Action

+ 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

– 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

Reversing an Action

– reverse

Returns a reversed action.

- (CCActionInterval *)reverse

Return Value

Created reversed action.

Declared In

CCActionInterval.h

Methods implemented by Subclasses

– isDone

Returns YES if the action has finished.

- (BOOL)isDone

Return Value

Action finished status.

Declared In

CCActionInterval.h