#include <AnimatedRobot.h>

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. | |
| WaveSound * | FootstepSample |
| These are the three types of sounds used for this class. | |
| WaveSound * | ExplosionSample |
| WaveSound * | TurnSample |
| AnimatedRobot::AnimatedRobot | ( | Point | startLocation, | |
| int | startDirection | |||
| ) |
| AnimatedRobot::~AnimatedRobot | ( | ) | [virtual] |
| 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.
list<AnimationSegment*>* AnimatedRobot::CommandAnimations [private] |
This list of animations will represent one command.
list<AnimationSegment*>::iterator AnimatedRobot::CurrentAnimation [private] |
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] |
WaveSound * AnimatedRobot::ExplosionSample [private] |
WaveSound* AnimatedRobot::FootstepSample [private] |
These are the three types of sounds used for this class.
WaveSound * AnimatedRobot::TurnSample [private] |
int AnimatedRobot::XPos [private] |
int AnimatedRobot::YPos [private] |
1.5.7.1