|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.ou.pacman.character.PacmanCharacter
public final class PacmanCharacter
Class used to define a character for the pac-man gameboard.
Constructor Summary | |
---|---|
PacmanCharacter(CharacterType characterType,
Location2D location)
|
|
PacmanCharacter(PacmanCharacter c)
|
Method Summary | |
---|---|
static java.awt.image.BufferedImage |
characterImage(CharacterType character)
Get the image for the specified character. |
Direction |
currentAction()
|
PacmanRecord |
getRecord()
|
java.awt.image.BufferedImage |
image()
Get the image for this character. |
Location2D |
location()
Current location of the character. |
void |
move(int xCoordinate,
int yCoordinate)
Change the location of the character. |
void |
move(Location2D location)
Change the location of the character. |
void |
setCurrentAction(Direction d)
|
CharacterType |
type()
The character type for the given character. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PacmanCharacter(CharacterType characterType, Location2D location)
public PacmanCharacter(PacmanCharacter c)
Method Detail |
---|
public static java.awt.image.BufferedImage characterImage(CharacterType character)
character
- - The character to get the image for
public java.awt.image.BufferedImage image()
public Location2D location()
public void move(int xCoordinate, int yCoordinate)
xCoordinate
- - The x coordinate to move to.yCoordinate
- - The y coordinate to move to.public void move(Location2D location)
location
- - The new location for the character.public CharacterType type()
public Direction currentAction()
public void setCurrentAction(Direction d)
public PacmanRecord getRecord()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |