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

Overview

Changes the speed of an action. Useful to simulate slow motion or fast forward effects.

Note: This action can’t be Sequence-able because it is not an CCIntervalAction.

Tasks

Accessing the Speed Action Attributes

Creating a CCActionSpeed Object

Initializing a CCActionSpeed Object

Properties

innerAction

Inner action of CCSpeed.

@property (nonatomic, readwrite, strong) CCActionInterval *innerAction

Declared In

CCAction.h

speed

Alter the speed of the inner function in runtime.

@property (nonatomic, readwrite) CGFloat speed

Discussion

  • Speeds below 1 will make the action run slower.
  • Speeds above 1 will make the action run faster.

Declared In

CCAction.h

Class Methods

actionWithAction:speed:

Creates the speed action.

+ (id)actionWithAction:(CCActionInterval *)action speed:(CGFloat)value

Parameters

action

Action to modify for speed.

value

Initial action speed.

Return Value

The CCActionSpeed object.

Declared In

CCAction.h

Instance Methods

initWithAction:speed:

Initalizes the speed action.

- (id)initWithAction:(CCActionInterval *)action speed:(CGFloat)value

Parameters

action

Action to modify for speed.

value

Initial action speed.

Return Value

An initialized CCActionSpeed object.

Declared In

CCAction.h