Package de.coreengine.system
Class Game
- java.lang.Object
-
- de.coreengine.system.Game
-
public class Game extends Object
Class that manage the whole game- Author:
- Darius Dinger
-
-
Constructor Summary
Constructors Constructor Description Game()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
exit(int code)
Exiting the game and dumping all reserved memorystatic Scene
getCurrentScene()
static void
gotoScene(int id)
Going to specific scenestatic void
init(int windowWidth, int windowHeight, String windowTitle, Window.Type windowType, TextureData windowIcon)
Initializing the game and all relevant librariesstatic boolean
isPaused()
static int
registerScene(Scene scene)
Register scene in the gamestatic void
removeScene(int id)
static void
setPaused(boolean paused)
Set the game in paused state or the other way round.static void
tick()
Updating inputs handlers, window and executing master renderers render call to render all stuff
-
-
-
Method Detail
-
init
public static void init(int windowWidth, int windowHeight, String windowTitle, Window.Type windowType, TextureData windowIcon)
Initializing the game and all relevant libraries- Parameters:
windowWidth
- Initial width of the game windowwindowHeight
- Initial height of the game windowwindowTitle
- Initial title of the game windowwindowType
- Initial window typewindowIcon
- Icon of the window, or null for no icon
-
registerScene
public static int registerScene(Scene scene)
Register scene in the game- Parameters:
scene
- Scene to register- Returns:
- Id of the scene
-
removeScene
public static void removeScene(int id)
-
getCurrentScene
public static Scene getCurrentScene()
- Returns:
- Current scene or null if no scene set
-
gotoScene
public static void gotoScene(int id)
Going to specific scene- Parameters:
id
- Id of the scene to enter
-
tick
public static void tick()
Updating inputs handlers, window and executing master renderers render call to render all stuff
-
setPaused
public static void setPaused(boolean paused)
Set the game in paused state or the other way round.- Parameters:
paused
- Should game be paused
-
isPaused
public static boolean isPaused()
- Returns:
- Is the game currently paused.
-
exit
public static void exit(int code)
Exiting the game and dumping all reserved memory- Parameters:
code
- Exit code (0 == Success, else Errror)
-
-