|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface GameState
A single state building up part of the game. The state include rendering, logic and input handling for the state.
| Method Summary | |
|---|---|
void |
enter(GameContainer container,
StateBasedGame game)
Notification that we've entered this game state |
int |
getID()
Get the ID of this state |
void |
init(GameContainer container,
StateBasedGame game)
Initialise the state. |
void |
leave(GameContainer container,
StateBasedGame game)
Notification that we're leaving this game state |
void |
render(GameContainer container,
StateBasedGame game,
Graphics g)
Render this state to the game's graphics context |
void |
update(GameContainer container,
StateBasedGame game,
int delta)
Update the state's logic based on the amount of time thats passed |
| Methods inherited from interface org.newdawn.slick.MouseListener |
|---|
mouseClicked, mouseDragged, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved |
| Methods inherited from interface org.newdawn.slick.KeyListener |
|---|
keyPressed, keyReleased |
| Methods inherited from interface org.newdawn.slick.ControllerListener |
|---|
controllerButtonPressed, controllerButtonReleased, controllerDownPressed, controllerDownReleased, controllerLeftPressed, controllerLeftReleased, controllerRightPressed, controllerRightReleased, controllerUpPressed, controllerUpReleased |
| Methods inherited from interface org.newdawn.slick.ControlledInputReciever |
|---|
inputEnded, inputStarted, isAcceptingInput, setInput |
| Method Detail |
|---|
int getID()
void init(GameContainer container,
StateBasedGame game)
throws SlickException
container - The container holding the gamegame - The game holding this state
SlickException - Indicates a failure to initialise a resource for this state
void render(GameContainer container,
StateBasedGame game,
Graphics g)
throws SlickException
container - The container holding the gamegame - The game holding this stateg - The graphics context to render to
SlickException - Indicates a failure to render an artifact
void update(GameContainer container,
StateBasedGame game,
int delta)
throws SlickException
container - The container holding the gamegame - The game holding this statedelta - The amount of time thats passed in millisecond since last update
SlickException - Indicates an internal error that will be reported through the
standard framework mechanism
void enter(GameContainer container,
StateBasedGame game)
throws SlickException
container - The container holding the gamegame - The game holding this state
SlickException - Indicates an internal error that will be reported through the
standard framework mechanism
void leave(GameContainer container,
StateBasedGame game)
throws SlickException
container - The container holding the gamegame - The game holding this state
SlickException - Indicates an internal error that will be reported through the
standard framework mechanism
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||