Path: blob/master/SLICK_HOME/src/org/newdawn/slick/Game.java
1456 views
package org.newdawn.slick;12/**3* The main game interface that should be implemented by any game being developed4* using the container system. There will be some utility type sub-classes as development5* continues.6*7* @see org.newdawn.slick.BasicGame8*9* @author kevin10*/11public interface Game {12/**13* Initialise the game. This can be used to load static resources. It's called14* before the game loop starts15*16* @param container The container holding the game17* @throws SlickException Throw to indicate an internal error18*/19public void init(GameContainer container) throws SlickException;2021/**22* Update the game logic here. No rendering should take place in this method23* though it won't do any harm.24*25* @param container The container holing this game26* @param delta The amount of time thats passed since last update in milliseconds27* @throws SlickException Throw to indicate an internal error28*/29public void update(GameContainer container, int delta) throws SlickException;3031/**32* Render the game's screen here.33*34* @param container The container holing this game35* @param g The graphics context that can be used to render. However, normal rendering36* routines can also be used.37* @throws SlickException Throw to indicate a internal error38*/39public void render(GameContainer container, Graphics g) throws SlickException;4041/**42* Notification that a game close has been requested43*44* @return True if the game should close45*/46public boolean closeRequested();4748/**49* Get the title of this game50*51* @return The title of the game52*/53public String getTitle();54}555657