mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-11 14:21:52 +09:00
added sources for Slick
Former-commit-id: 1647fa32ef6894bd7db44f741f07c2f4dcdf9054 Former-commit-id: 0e5810dcfbe1fd59b13e7cabe9f1e93c5542da2d
This commit is contained in:
55
lib/slick-source/org/newdawn/slick/Game.java
Normal file
55
lib/slick-source/org/newdawn/slick/Game.java
Normal file
@@ -0,0 +1,55 @@
|
||||
package org.newdawn.slick;
|
||||
|
||||
/**
|
||||
* The main game interface that should be implemented by any game being developed
|
||||
* using the container system. There will be some utility type sub-classes as development
|
||||
* continues.
|
||||
*
|
||||
* @see org.newdawn.slick.BasicGame
|
||||
*
|
||||
* @author kevin
|
||||
*/
|
||||
public interface Game {
|
||||
/**
|
||||
* Initialise the game. This can be used to load static resources. It's called
|
||||
* before the game loop starts
|
||||
*
|
||||
* @param container The container holding the game
|
||||
* @throws SlickException Throw to indicate an internal error
|
||||
*/
|
||||
public void init(GameContainer container) throws SlickException;
|
||||
|
||||
/**
|
||||
* Update the game logic here. No rendering should take place in this method
|
||||
* though it won't do any harm.
|
||||
*
|
||||
* @param container The container holing this game
|
||||
* @param delta The amount of time thats passed since last update in milliseconds
|
||||
* @throws SlickException Throw to indicate an internal error
|
||||
*/
|
||||
public void update(GameContainer container, int delta) throws SlickException;
|
||||
|
||||
/**
|
||||
* Render the game's screen here.
|
||||
*
|
||||
* @param container The container holing this game
|
||||
* @param g The graphics context that can be used to render. However, normal rendering
|
||||
* routines can also be used.
|
||||
* @throws SlickException Throw to indicate a internal error
|
||||
*/
|
||||
public void render(GameContainer container, Graphics g) throws SlickException;
|
||||
|
||||
/**
|
||||
* Notification that a game close has been requested
|
||||
*
|
||||
* @return True if the game should close
|
||||
*/
|
||||
public boolean closeRequested();
|
||||
|
||||
/**
|
||||
* Get the title of this game
|
||||
*
|
||||
* @return The title of the game
|
||||
*/
|
||||
public String getTitle();
|
||||
}
|
||||
Reference in New Issue
Block a user