Skip to content

Instantly share code, notes, and snippets.

@jxcodetw
Created May 22, 2014 08:48
Show Gist options
  • Save jxcodetw/dcaf6f46cfeaf1ad13f7 to your computer and use it in GitHub Desktop.
Save jxcodetw/dcaf6f46cfeaf1ad13f7 to your computer and use it in GitHub Desktop.
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.BasicGameState;
import org.newdawn.slick.state.StateBasedGame;
public class MenuState extends BasicGameState
{
@Override
public void init(GameContainer arg0, StateBasedGame arg1)
throws SlickException {
}
@Override
public void render(GameContainer arg0, StateBasedGame arg1, Graphics g)
throws SlickException {
g.drawString("state: " + getID(), 10, 20);
}
@Override
public void update(GameContainer arg0, StateBasedGame arg1, int arg2)
throws SlickException {
}
@Override
public int getID() {
return 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment