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
-
fixedTimestepproperty -
delegateproperty -
runningSequenceNameproperty -
lastCompletedSequenceNameproperty -
playbackSpeedproperty -
pausedproperty -
– runAnimationsForSequenceNamed: -
– runAnimationsForSequenceNamed:tweenDuration: -
– setCompletedAnimationCallbackBlock: -
– jumpToSequenceNamed:time:
FrameAnimation Methods
Properties
delegate
The animation manager delegate receives updates about the animations currently being played.
@property (nonatomic, weak) NSObject<CCBAnimationManagerDelegate> *delegateDeclared In
CCAnimationManager.hfixedTimestep
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 fixedTimestepDeclared In
CCAnimationManager.hlastCompletedSequenceName
The name of the last completed sequence (timeline).
@property (nonatomic, readonly) NSString *lastCompletedSequenceNameDeclared In
CCAnimationManager.hpaused
Set to true to pause the animation currently being run.
@property (nonatomic, assign) bool pausedDeclared In
CCAnimationManager.hInstance Methods
addAnimationsWithDictionary:node:
Add an animation from a NSDictionary.
- (void)addAnimationsWithDictionary:(NSDictionary *)dictionary node:(CCNode *)nodeParameters
- dictionary
Dictionary.
Declared In
CCAnimationManager+FrameAnimation.haddAnimationsWithFile:node:
Add an animation from a file.
- (void)addAnimationsWithFile:(NSString *)plist node:(CCNode *)nodeParameters
- plist
File path.
Declared In
CCAnimationManager+FrameAnimation.hjumpToSequenceNamed:time:
Jumps to a specific time in a specific sequence (timeline).
- (void)jumpToSequenceNamed:(NSString *)name time:(float)timeParameters
- name
The name of the sequence to jump to.
- time
The time in the sequence.
Declared In
CCAnimationManager.hrunAnimationsForSequenceNamed:
Plays an animation sequence (timeline) by its name.
- (void)runAnimationsForSequenceNamed:(NSString *)nameParameters
- name
The name of the sequence to play.
Declared In
CCAnimationManager.hrunAnimationsForSequenceNamed:tweenDuration:
Plays an animation sequence (timeline) by its name, tweens smoothly to the new sequence.
- (void)runAnimationsForSequenceNamed:(NSString *)name tweenDuration:(float)tweenDurationParameters
- name
The name of the sequence to play.
- tweenDuration
Time to tween to the new sequence.
Declared In
CCAnimationManager.h