|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.newdawn.slick.state.BasicGameState org.newdawn.slick.tests.states.TestState1
public class TestState1
A simple test state to display a message describing the test
Field Summary | |
---|---|
static int |
ID
The ID given to this state |
Constructor Summary | |
---|---|
TestState1()
|
Method Summary | |
---|---|
int |
getID()
Get the ID of this state |
void |
init(GameContainer container,
StateBasedGame game)
Initialise the state. |
void |
keyReleased(int key,
char c)
Notification that a key was released |
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 class org.newdawn.slick.state.BasicGameState |
---|
controllerButtonPressed, controllerButtonReleased, controllerDownPressed, controllerDownReleased, controllerLeftPressed, controllerLeftReleased, controllerRightPressed, controllerRightReleased, controllerUpPressed, controllerUpReleased, enter, inputEnded, inputStarted, isAcceptingInput, keyPressed, leave, mouseClicked, mouseDragged, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, setInput |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ID
Constructor Detail |
---|
public TestState1()
Method Detail |
---|
public int getID()
GameState
getID
in interface GameState
getID
in class BasicGameState
BasicGameState.getID()
public void init(GameContainer container, StateBasedGame game) throws SlickException
GameState
container
- The container holding the gamegame
- The game holding this state
SlickException
- Indicates a failure to initialise a resource for this stateGameState.init(org.newdawn.slick.GameContainer, org.newdawn.slick.state.StateBasedGame)
public void render(GameContainer container, StateBasedGame game, Graphics g)
GameState
container
- The container holding the gamegame
- The game holding this stateg
- The graphics context to render toGameState.render(org.newdawn.slick.GameContainer, org.newdawn.slick.state.StateBasedGame, org.newdawn.slick.Graphics)
public void update(GameContainer container, StateBasedGame game, int delta)
GameState
container
- The container holding the gamegame
- The game holding this statedelta
- The amount of time thats passed in millisecond since last updateGameState.update(org.newdawn.slick.GameContainer, org.newdawn.slick.state.StateBasedGame, int)
public void keyReleased(int key, char c)
KeyListener
keyReleased
in interface KeyListener
keyReleased
in class BasicGameState
key
- The key code that was released (@see org.newdawn.slick.Input)c
- The character of the key that was releasedBasicGameState.keyReleased(int, char)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |