AnimatedSprite Class Reference

#include <AnimatedSprite.h>

Inheritance diagram for AnimatedSprite:

Sprite List of all members.

Public Member Functions

 AnimatedSprite (std::string filename, List *spriteInfo)
 AnimatedSprite (AnimatedSprite *sprite)
 ~AnimatedSprite ()
Spriteinstance ()
virtual void update ()
virtual void draw (int x, int y, bool origin=LEVEL)
virtual void reset ()

Protected Attributes

std::vector< Sprite * > _createdSprites
std::vector< SpriteTime_sprites
int _index
int _time
int _totalTime
bool _loop

Detailed Description

Definition at line 14 of file AnimatedSprite.h.


Constructor & Destructor Documentation

AnimatedSprite::AnimatedSprite std::string  filename,
List spriteInfo
 

Definition at line 17 of file AnimatedSprite.cpp.

References Sprite::_filename, List::empty(), List::firstList(), Sprite::loadSprite(), List::rest(), and SpriteTime::s.

Referenced by instance().

AnimatedSprite::AnimatedSprite AnimatedSprite sprite  ) 
 

Definition at line 62 of file AnimatedSprite.cpp.

References _loop, _sprites, and _totalTime.

AnimatedSprite::~AnimatedSprite  ) 
 

Definition at line 70 of file AnimatedSprite.cpp.

References _createdSprites.


Member Function Documentation

void AnimatedSprite::draw int  x,
int  y,
bool  origin = LEVEL
[virtual]
 

Reimplemented from Sprite.

Definition at line 95 of file AnimatedSprite.cpp.

References _index, and _sprites.

Sprite * AnimatedSprite::instance  )  [virtual]
 

Reimplemented from Sprite.

Definition at line 100 of file AnimatedSprite.cpp.

References _createdSprites, and AnimatedSprite().

virtual void AnimatedSprite::reset  )  [inline, virtual]
 

Reimplemented from Sprite.

Definition at line 27 of file AnimatedSprite.h.

References _index, and _time.

void AnimatedSprite::update  )  [virtual]
 

Reimplemented from Sprite.

Definition at line 76 of file AnimatedSprite.cpp.

References _index, _loop, _sprites, _time, and _totalTime.


Member Data Documentation

std::vector<Sprite*> AnimatedSprite::_createdSprites [protected]
 

Definition at line 30 of file AnimatedSprite.h.

Referenced by instance(), and ~AnimatedSprite().

int AnimatedSprite::_index [protected]
 

Definition at line 32 of file AnimatedSprite.h.

Referenced by draw(), reset(), and update().

bool AnimatedSprite::_loop [protected]
 

Definition at line 35 of file AnimatedSprite.h.

Referenced by AnimatedSprite(), and update().

std::vector<SpriteTime> AnimatedSprite::_sprites [protected]
 

Definition at line 31 of file AnimatedSprite.h.

Referenced by AnimatedSprite(), draw(), and update().

int AnimatedSprite::_time [protected]
 

Definition at line 33 of file AnimatedSprite.h.

Referenced by reset(), and update().

int AnimatedSprite::_totalTime [protected]
 

Definition at line 34 of file AnimatedSprite.h.

Referenced by AnimatedSprite(), and update().


The documentation for this class was generated from the following files:
Generated on Sat Apr 22 15:05:21 2006 for ProjectX by  doxygen 1.4.6-NO