Public Member Functions | |
PacmanActor (GridNode startingPosition) | |
Constructor for this PacmanActor. | |
GridNode | getNode () |
int | getPelletsEaten () |
int | getX () |
int | getY () |
int | getLivesLeft () |
void | setDesiredDirection (int d) |
Sets the dirrection the user wishes pacman to move. | |
void | setLivesLeft (int i) |
Sets the number of lives for this pacman. | |
boolean | isInvincible () |
void | restart () |
Resets Pacman to his original position but keeps the number of pellets eaten. | |
void | advanceFrame () |
Called to advance the logic of the game one frame. | |
void | paint (Graphics g) |
Paints the PacmanActor. | |
Public Attributes | |
int | score_ |
Keeps track of pacman's current score. | |
boolean | invincible_ |
This is the invincibility variable... | |
int | myLivesLeft_ |
New April 15th, 2003 Implements Lives. | |
Static Public Attributes | |
final int | NONE = 0 |
Enum for a desired dirrection. | |
final int | UP = 1 |
Enum for a desired dirrection. | |
final int | DOWN = 2 |
Enum for a desired dirrection. | |
final int | LEFT = 3 |
Enum for a desired dirrection. | |
final int | RIGHT = 4 |
Enum for a desired dirrection. | |
Private Member Functions | |
void | goToNode (GridNode n) |
Private Attributes | |
GridNode | myNode_ |
The node where pacman currently resides. | |
int | pelletsEaten_ |
The number of small pellets that pacman has eaten this game. | |
int | pixelX_ |
current X Pixel coord of this actor | |
int | pixelY_ |
current Y Pixel coord of this actor | |
int | newPixelX_ |
destination X Pixel coord for this actor | |
int | newPixelY_ |
destination Y Pixel coord for this actor | |
int | direction_ |
Desired dirrecton where pacman should move. | |
int | animDirection_ = RIGHT |
NEW Apr. | |
GridNode | startNode_ |
The Node where pacman starts. | |
int | mouthAngle_ |
The current angle of the opening of pacman's mouth. | |
int | mouthAngleChange_ |
The amount and dirrection of change that the mouth will Take in the next frame. | |
int | mouthAngleDirection_ |
Specifies startAngle in fillARc depending on direction pacman is facing. | |
PacmanTimer | invincibleTimer |
New April 28th, 2003 Implements Invinciblity. |
|
Constructor for this PacmanActor.
|
|
Called to advance the logic of the game one frame.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Paints the PacmanActor.
|
|
Resets Pacman to his original position but keeps the number of pellets eaten.
|
|
Sets the dirrection the user wishes pacman to move.
|
|
Sets the number of lives for this pacman.
|
|
NEW Apr. 3, 2003 - PDF
Direction PacMan is currently moving |
|
Desired dirrecton where pacman should move. This is specified by user actions (pressing movment keys) |
|
Enum for a desired dirrection.
|
|
This is the invincibility variable... If pacman is invincible he'll eat the ghost :o) |
|
New April 28th, 2003 Implements Invinciblity.
|
|
Enum for a desired dirrection.
|
|
The current angle of the opening of pacman's mouth.
|
|
The amount and dirrection of change that the mouth will Take in the next frame.
|
|
Specifies startAngle in fillARc depending on direction pacman is facing.
|
|
New April 15th, 2003 Implements Lives.
|
|
The node where pacman currently resides.
|
|
destination X Pixel coord for this actor
|
|
destination Y Pixel coord for this actor
|
|
Enum for a desired dirrection.
|
|
The number of small pellets that pacman has eaten this game. This helps us calculate the score. |
|
current X Pixel coord of this actor
|
|
current Y Pixel coord of this actor
|
|
Enum for a desired dirrection.
|
|
Keeps track of pacman's current score.
|
|
The Node where pacman starts.
|
|
Enum for a desired dirrection.
|