# CCAnimationManager Class Reference

Inherits from | NSObject
Conforms to | CCSchedulerTarget
Declared in | CCAnimationManager.h

## Overview

The animation manager plays back animations, usually created by a tool such as SpriteBuilder. Any animation can have an arbitrary number of sequences (timelines) which each have keyframes for different properties.

## Tasks

### Other Methods

- `fixedTimestep` property
- `delegate` property
- `runningSequenceName` property
- `lastCompletedSequenceName` property
- `playbackSpeed` property
- `paused` property
- `– runAnimationsForSequenceNamed:`
- `– runAnimationsForSequenceNamed:tweenDuration:`
- `– setCompletedAnimationCallbackBlock:`
- `– jumpToSequenceNamed:time:`

### FrameAnimation Methods

- `– addAnimationsWithDictionary:node:`
- `– addAnimationsWithFile:node:`

## Properties

### delegate

The animation manager delegate receives updates about the animations currently being played.

`@property (nonatomic, weak) NSObject<CCBAnimationManagerDelegate> *delegate`

#### Declared In

`CCAnimationManager.h`

### fixedTimestep

If set to true the animation manager will run on a fixed time step, this is required to run animations toghether with physics.

`@property (nonatomic, assign) bool fixedTimestep`

#### Declared In

`CCAnimationManager.h`

### lastCompletedSequenceName

The name of the last completed sequence (timeline).

`@property (nonatomic, readonly) NSString *lastCompletedSequenceName`

#### Declared In

`CCAnimationManager.h`

### paused

Set to true to pause the animation currently being run.

`@property (nonatomic, assign) bool paused`

#### Declared In

`CCAnimationManager.h`

### playbackSpeed

Playback speed, default is 1 and corresponds to the normal playback speed. Use this property for fast forward or slow motion playback.

`@property (nonatomic, assign) float playbackSpeed`

#### Declared In

`CCAnimationManager.h`

### runningSequenceName

The name of the currently running sequence (timeline).

`@property (unsafe_unretained, nonatomic, readonly) NSString *runningSequenceName`

#### Declared In

`CCAnimationManager.h`

## Instance Methods

### addAnimationsWithDictionary:node:

Add an animation from a NSDictionary.

`- (void)addAnimationsWithDictionary:(NSDictionary *)dictionary node:(CCNode *)node`

#### Parameters

dictionary

  Dictionary.

#### Declared In

`CCAnimationManager+FrameAnimation.h`

### addAnimationsWithFile:node:

Add an animation from a file.

`- (void)addAnimationsWithFile:(NSString *)plist node:(CCNode *)node`

#### Parameters

plist

  File path.

#### Declared In

`CCAnimationManager+FrameAnimation.h`

### jumpToSequenceNamed:time:

Jumps to a specific time in a specific sequence (timeline).

`- (void)jumpToSequenceNamed:(NSString *)name time:(float)time`

#### Parameters

name

  The name of the sequence to jump to.

time

  The time in the sequence.

#### Declared In

`CCAnimationManager.h`

### runAnimationsForSequenceNamed:

Plays an animation sequence (timeline) by its name.

`- (void)runAnimationsForSequenceNamed:(NSString *)name`

#### Parameters

name

  The name of the sequence to play.

#### Declared In

`CCAnimationManager.h`

### runAnimationsForSequenceNamed:tweenDuration:

Plays an animation sequence (timeline) by its name, tweens smoothly to the new sequence.

`- (void)runAnimationsForSequenceNamed:(NSString *)name tweenDuration:(float)tweenDuration`

#### Parameters

name

  The name of the sequence to play.

tweenDuration

  Time to tween to the new sequence.

#### Declared In

`CCAnimationManager.h`

### setCompletedAnimationCallbackBlock:

Sets a block to be called when an animation sequence has finished playing.

`- (void)setCompletedAnimationCallbackBlock:(void ( ^ ) ( id sender ))b`

#### Parameters

b

  The block to call.

#### Declared In

`CCAnimationManager.h`