|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object erland.game.tileadventure.TileAdventurePlayer
public class TileAdventurePlayer
Implementation of control of the user player
Constructor Summary | |
---|---|
TileAdventurePlayer(GameEnvironmentInterface environment,
int playerNo)
Create player object |
Method Summary | |
---|---|
ActionHandlerInterface |
getActionHandler()
|
NetworkConnectionInterface |
getConnection()
|
GameObject |
getControlledObject()
|
GameObject |
getPlayerObject()
|
boolean |
isCompleted()
Check if player has completed game |
boolean |
isGameOver()
Check if game is over for player |
void |
jump()
Jump |
void |
setActionHandler(ActionHandlerInterface actionHandler)
|
void |
setConnection(NetworkConnectionInterface connection)
|
void |
setPlayerObject(GameObject object)
|
void |
startMoveDown()
Start moving down |
void |
startMoveLeft()
Start moving left |
void |
startMoveRight()
Start moving right |
void |
startMoveUp()
Start moving up |
void |
stopMoveDown()
Stop moving down |
void |
stopMoveLeft()
Stop moving left |
void |
stopMoveRight()
Stop moving right |
void |
stopMoveUp()
Stop moving up |
void |
stopped(ActionInterface action)
|
void |
update()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TileAdventurePlayer(GameEnvironmentInterface environment, int playerNo)
environment
- Game environmentplayerNo
- Player number (if networked game)Method Detail |
---|
public void setConnection(NetworkConnectionInterface connection)
setConnection
in interface GamePlayerInterface
public NetworkConnectionInterface getConnection()
getConnection
in interface GamePlayerInterface
public void setPlayerObject(GameObject object)
public GameObject getPlayerObject()
public ActionHandlerInterface getActionHandler()
public void setActionHandler(ActionHandlerInterface actionHandler)
public void startMoveRight()
public void startMoveLeft()
public void startMoveUp()
public void startMoveDown()
public void stopMoveRight()
public void stopMoveLeft()
public void stopMoveUp()
public void stopMoveDown()
public void jump()
public void update()
public boolean isCompleted()
public boolean isGameOver()
public GameObject getControlledObject()
getControlledObject
in interface ControllerInterface
public void stopped(ActionInterface action)
stopped
in interface ControllerInterface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |