|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deken.game.state.GameState
public abstract class GameState
Title: GameState
Description: GameState is used for providing an over arching state of the game. The GameState is used to monitory the high level of the game and change it's state: The main playing state, the player wins the game, the player loses the game. In the update method you can define what will case the game to change state. The BaseGameCanvas has the current GameState. GameState
Copyright: Copyright (c) Apr 2, 2015
Field Summary | |
---|---|
protected BaseGameCanvas |
gameCanvas
|
Constructor Summary | |
---|---|
GameState()
|
Method Summary | |
---|---|
abstract void |
activateState()
Activate this state, to setup any needed features for this state. |
void |
changeState(GameState newGameState)
This method is called to change the game's state, by passing in the new state. |
abstract void |
deactivateState()
This is called on when the changeState is called. |
void |
setGameCanvas(BaseGameCanvas baseGameCanvas)
|
abstract void |
update(long elapseTime)
This is called in the GameTimer's update phase. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.deken.game.Updateable |
---|
getName |
Field Detail |
---|
protected BaseGameCanvas gameCanvas
Constructor Detail |
---|
public GameState()
Method Detail |
---|
public abstract void activateState()
public final void changeState(GameState newGameState)
newGameState
- public abstract void deactivateState()
public final void setGameCanvas(BaseGameCanvas baseGameCanvas)
public abstract void update(long elapseTime)
update
in interface Updateable
elapseTime
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |