|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmako5.ctrl.GameStateMachine
public class GameStateMachine
Controls a group of game states and is capable of running them.
| Constructor Summary | |
|---|---|
GameStateMachine()
Creates a new GameStateMachine. |
|
| Method Summary | |
|---|---|
void |
add(GameState s)
Adds a new state. |
void |
cleanup()
Cleans up after the program has finished. |
void |
exit()
Terminates the program. |
GameState |
getCurrent()
Returns the current game state. |
HashMap |
getData()
Returns the stored game data for this. |
void |
loadResources()
|
void |
loadStates()
|
void |
run()
Runs the program. |
void |
setCurrent(int i)
Sets the current state. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GameStateMachine()
| Method Detail |
|---|
public void add(GameState s)
s - the state to addpublic GameState getCurrent()
public void setCurrent(int i)
i - the index of the game state to switch topublic HashMap getData()
public void exit()
public void cleanup()
public void loadStates()
public void loadResources()
public void run()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||