AnimationCoordinator Class Reference

#include <AnimationCoordinator.h>

Inheritance diagram for AnimationCoordinator:
ListenerObject

# Public Member Functions

void constructor (const CharSetSpec *charSetSpec, ListenerObject scope)
bool playAnimation (AnimationController animationController, const AnimationFunction **animationFunctions, const char *animationName)
void addAnimationController (AnimationController animationController)
void removeAnimationController (AnimationController animationController)
const CharSetSpecgetCharSetSpec ()

# Protected Attributes

ListenerObject scope
 Object that might need to listen for playback related events.
VirtualList animationControllers
 List of animation controllers to sync.
const CharSetSpeccharSetSpec

# Additional Inherited Members

- Private Member Functions inherited from ListenerObject
void constructor ()
 Class' constructor.
void destructor ()
 Class' destructor.
void addEventListener (ListenerObject listener, uint16 eventCode)
void removeEventListener (ListenerObject listener, uint16 eventCode)
void removeEventListeners (uint16 eventCode)
void removeAllEventListeners ()
 Remove all listener objects.
bool hasActiveEventListeners ()
void fireEvent (uint16 eventCode)
void sendMessageTo (ListenerObject receiver, uint32 message, uint32 delay, uint32 randomDelay)
void sendMessageToSelf (uint32 message, uint32 delay, uint32 randomDelay)
void discardAllMessages ()
 Discard all messages, both to be sent and to be received.
void discardMessages (uint32 message)
virtual bool onEvent (ListenerObject eventFirer, uint16 eventCode)
virtual bool handleMessage (Telegram telegram)
- Private Attributes inherited from ListenerObject
VirtualList events
 List of registered events.
int8 eventFirings
 Counter that keeps track of the number of fired events to prevent race conditions in nested firings.

# Detailed Description

Class AnimationCoordinator

Inherits from ListenerObject

Coordinates animation controllers whose sprites share the same CharSet.

Definition at line 36 of file AnimationCoordinator.h.

# Member Function Documentation

# addAnimationController()

void AnimationCoordinator::addAnimationController ( AnimationController animationController)

Add an animation controller to coordinate.

Parameters
animationControllerAnimation controller to coordinate

Definition at line 95 of file AnimationCoordinator.c.

# constructor()

void AnimationCoordinator::constructor ( const CharSetSpec * charSetSpec,
ListenerObject scope )

Class' constructor

Parameters
charSetSpecSpec shared by the animation controllers to coordinate
scopeObject that might need to listen for playback related events

Definition at line 35 of file AnimationCoordinator.c.

# getCharSetSpec()

const CharSetSpec * AnimationCoordinator::getCharSetSpec ( )

Retrieve the spec shared by the animation controllers to coordinate.

Returns
Pointer to spec shared by the animation controllers to coordinate

Definition at line 145 of file AnimationCoordinator.c.

# playAnimation()

bool AnimationCoordinator::playAnimation ( AnimationController animationController,
const AnimationFunction ** animationFunctions,
const char * animationName )

Play an animation on the specified animation controller.

Parameters
animationControllerAnimation controller on which to play the animation
animationFunctionsArray of animation functions in which to look for the animation to play
animationNameName of the animation to play
Returns
True if the animation was found and started to play; false otherwise

Definition at line 60 of file AnimationCoordinator.c.

# removeAnimationController()

void AnimationCoordinator::removeAnimationController ( AnimationController animationController)

Remove a coordinated animation controller.

Parameters
animationControllerCoordinated animation controller to remove

Definition at line 112 of file AnimationCoordinator.c.

# Member Data Documentation

# animationControllers

VirtualList AnimationCoordinator::animationControllers
protected

List of animation controllers to sync.

Definition at line 44 of file AnimationCoordinator.h.

# charSetSpec

const CharSetSpec* AnimationCoordinator::charSetSpec
protected

Definition at line 47 of file AnimationCoordinator.h.

# scope

ListenerObject AnimationCoordinator::scope
protected

Object that might need to listen for playback related events.

Definition at line 41 of file AnimationCoordinator.h.


The documentation for this class was generated from the following files: