AnimatedRobot Class Reference

#include <AnimatedRobot.h>

Collaboration diagram for AnimatedRobot:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 AnimatedRobot (Point startLocation, int startDirection)
virtual ~AnimatedRobot ()
void draw (BITMAP *bmp, int xPos, int yPos, int cellXSize, int cellYSize)
 Takes the location of the upper left corner of the maze and the square size and draws the robot appropriately.
bool nextAnimation ()
 Advances the CurrentAnimation to the next animation in CommandAnimations, returns true if there are no more animations left after it.
void setupCommand (MazeCommand command, MoveOutcome outcome)
 Takes a MazeCommand and the outcome of the move to generate the next CommandAnimations and to figure out the robot's Distance and Direction.
void move ()
 Updates the robot's location using Distance to figure how far to go and Direction for which way to go.
void setFinished ()
 This sets the robot to its success animation.
int getDirection ()
Point getPosition ()

Private Member Functions

void removeAnimations (list< AnimationSegment * > *commands, int numberToRemove)
 Remove animations from the list, which is used for crashes.

Private Attributes

int XPos
int YPos
int Distance
int Direction
list< AnimationSegment * >
::iterator 
CurrentAnimation
 This is the current animation being used.
list< AnimationSegment * > * CommandAnimations
 This list of animations will represent one command.
BITMAP * CurrentImage
 This is the image that is currently being drawn for the robot.
WaveSoundFootstepSample
 These are the three types of sounds used for this class.
WaveSoundExplosionSample
WaveSoundTurnSample


Constructor & Destructor Documentation

AnimatedRobot::AnimatedRobot ( Point  startLocation,
int  startDirection 
)

AnimatedRobot::~AnimatedRobot (  )  [virtual]


Member Function Documentation

void AnimatedRobot::draw ( BITMAP *  bmp,
int  xPos,
int  yPos,
int  cellXSize,
int  cellYSize 
)

Takes the location of the upper left corner of the maze and the square size and draws the robot appropriately.

int AnimatedRobot::getDirection (  )  [inline]

Point AnimatedRobot::getPosition (  )  [inline]

void AnimatedRobot::move (  ) 

Updates the robot's location using Distance to figure how far to go and Direction for which way to go.

bool AnimatedRobot::nextAnimation (  ) 

Advances the CurrentAnimation to the next animation in CommandAnimations, returns true if there are no more animations left after it.

void AnimatedRobot::removeAnimations ( list< AnimationSegment * > *  commands,
int  numberToRemove 
) [private]

Remove animations from the list, which is used for crashes.

void AnimatedRobot::setFinished (  ) 

This sets the robot to its success animation.

void AnimatedRobot::setupCommand ( MazeCommand  command,
MoveOutcome  outcome 
)

Takes a MazeCommand and the outcome of the move to generate the next CommandAnimations and to figure out the robot's Distance and Direction.


Member Data Documentation

This list of animations will represent one command.

This is the current animation being used.

BITMAP* AnimatedRobot::CurrentImage [private]

This is the image that is currently being drawn for the robot.

int AnimatedRobot::Direction [private]

int AnimatedRobot::Distance [private]

These are the three types of sounds used for this class.

int AnimatedRobot::XPos [private]

int AnimatedRobot::YPos [private]


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

Generated on Mon Mar 16 14:33:05 2009 for LearningGaming by  doxygen 1.5.7.1