SimpleAnimation Class Reference

#include <simpleanimation.h>

List of all members.


Detailed Description

This class is a leightweight alternative to the AnimatedSprite class.

It hosts a looping animation without actions and directions.

Definition at line 36 of file simpleanimation.h.


Public Member Functions

 SimpleAnimation (Animation *animation)
 Creates a simple animation with an already created animation.
 SimpleAnimation (xmlNodePtr animationNode)
 Creates a simple animation that creates its animation from XML Data.
 ~SimpleAnimation ()
void update (unsigned int timePassed)
bool draw (Graphics *graphics, int posX, int posY) const
void reset ()
 Resets the animation.
ImagegetCurrentImage () const

Private Attributes

AnimationmAnimation
 The hosted animation.
unsigned int mAnimationTime
 Time in game ticks the current frame is shown.
unsigned int mAnimationPhase
 Index of current animation phase.
FramemCurrentFrame
 Current animation phase.

Constructor & Destructor Documentation

SimpleAnimation::SimpleAnimation ( Animation animation  ) 

Creates a simple animation with an already created animation.

Definition at line 31 of file simpleanimation.cpp.

SimpleAnimation::SimpleAnimation ( xmlNodePtr  animationNode  ) 

Creates a simple animation that creates its animation from XML Data.

Definition at line 39 of file simpleanimation.cpp.

SimpleAnimation::~SimpleAnimation (  ) 

Definition at line 153 of file simpleanimation.cpp.


Member Function Documentation

void SimpleAnimation::update ( unsigned int  timePassed  ) 

Definition at line 132 of file simpleanimation.cpp.

bool SimpleAnimation::draw ( Graphics graphics,
int  posX,
int  posY 
) const

Definition at line 116 of file simpleanimation.cpp.

void SimpleAnimation::reset (  ) 

Resets the animation.

Definition at line 126 of file simpleanimation.cpp.

Image * SimpleAnimation::getCurrentImage (  )  const

Definition at line 148 of file simpleanimation.cpp.


Member Data Documentation

The hosted animation.

Definition at line 64 of file simpleanimation.h.

unsigned int SimpleAnimation::mAnimationTime [private]

Time in game ticks the current frame is shown.

Definition at line 67 of file simpleanimation.h.

unsigned int SimpleAnimation::mAnimationPhase [private]

Index of current animation phase.

Definition at line 70 of file simpleanimation.h.

Current animation phase.

Definition at line 73 of file simpleanimation.h.


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

Generated on Sun Apr 26 17:30:44 2009 for The Mana World by  doxygen 1.5.5