Package pacManReloaded.common.model
Class Ghost
- java.lang.Object
-
- pacManReloaded.server.Player
-
- pacManReloaded.common.model.Ghost
-
public class Ghost extends Player
-
-
Field Summary
Fields Modifier and Type Field Description GhostColor
color
-
Constructor Summary
Constructors Constructor Description Ghost(java.awt.geom.Point2D.Float point, INavigator nav, java.awt.geom.Point2D.Float startPoint)
Ghost(java.awt.geom.Point2D.Float point, INavigator nav, java.awt.geom.Point2D.Float startPoint, Player player)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
changeDir(Direction dir)
Direction
getDirection()
"getter" for the direction of the playervoid
nextMove()
ckeck if the next direction is possible, if it is change position, else change position in the same directionvoid
setFear(boolean b)
-
Methods inherited from class pacManReloaded.server.Player
changePosition, gameFinished, getClient, getMsgSentTime, getState, sendActorPosition, sendBeginFailed, sendGameState, sendInitGameState, sendInitPlayer, sendMap, sendRemoveObject, setDirection, setPosition, setStartPoint, setState
-
-
-
-
Field Detail
-
color
public GhostColor color
-
-
Constructor Detail
-
Ghost
public Ghost(java.awt.geom.Point2D.Float point, INavigator nav, java.awt.geom.Point2D.Float startPoint, Player player)
-
Ghost
public Ghost(java.awt.geom.Point2D.Float point, INavigator nav, java.awt.geom.Point2D.Float startPoint)
-
-
Method Detail
-
nextMove
public void nextMove()
ckeck if the next direction is possible, if it is change position, else change position in the same direction
-
changeDir
public void changeDir(Direction dir)
-
getDirection
public Direction getDirection()
Description copied from class:Player
"getter" for the direction of the player- Overrides:
getDirection
in classPlayer
- Returns:
- the direction
-
setFear
public void setFear(boolean b)
-
-