public abstract class Game extends Object implements Updatable, Renderable, EngineHolder<CoreEngine>
| Constructor and Description |
|---|
Game() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Node node)
Adds a node the scenegraph.
|
void |
add(Node node,
boolean forceName)
Adds a node the scenegraph.
|
Node |
get(String nodeName)
Retrives a node by it's name.
|
GameDebugger |
getDebugger() |
CoreEngine |
getEngine()
Retrieves the stored engine
|
InputManager |
getInputManager() |
Texture |
getSplashScreen()
Returns the loading/splash image.
|
abstract Dimension |
getWindowDimensions()
Returns the dimensions of the window.
|
abstract String |
getWindowTitle()
Returns the title of the window.
|
boolean |
has(Node node)
Checks if a node exists in the scenegraph.
|
abstract void |
init(CoreEngine engine)
The Game should load all resources and setup the scene here.
|
boolean |
isDebug()
Is this game in debug mode?
|
void |
preInit(CoreEngine engine)
Injects the engine into game and scenegraph
and inits the user's game.
|
void |
preRender(RenderEngine renderEngine)
This method will get called before each render
|
void |
remove(Node node)
Removes a node from the scenegraph.
|
boolean |
remove(String nodeName)
Removes a node from the scenegraph by it's name.
|
void |
renderSceneGraph(RenderEngine renderEngine)
Renders the scenegraph
|
void |
setDebug(boolean debug)
Enabled or disables the GameDebugger.
|
void |
setEngine(CoreEngine engine)
Inject the engine
|
void |
setInputManager(InputManager inputManager) |
void |
updateSceneGraph(float delta)
Delegates to the scenegraph and debugger
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrenderpublic abstract Dimension getWindowDimensions()
public abstract String getWindowTitle()
public void updateSceneGraph(float delta)
delta - The delta timepublic final void preInit(CoreEngine engine)
engine - The CoreEngine instance (parent)public abstract void init(CoreEngine engine)
engine - The CoreEngine instance (parent)public final void renderSceneGraph(RenderEngine renderEngine)
renderEngine - The active RenderEngine instancepublic void preRender(RenderEngine renderEngine)
renderEngine - The active RenderEngine instancepublic void add(Node node)
node - The node which should get added.public void add(Node node, boolean forceName)
node - The node which should get added.public Node get(String nodeName)
Nodes names with
a slash (/).nodeName - The node's namepublic boolean has(Node node)
node - The node to checkpublic void remove(Node node)
node - The node to removepublic boolean remove(String nodeName)
nodeName - The node's namepublic Texture getSplashScreen()
public CoreEngine getEngine()
EngineHoldergetEngine in interface EngineHolder<CoreEngine>EngineHolder.getEngine()public void setEngine(CoreEngine engine)
EngineHoldersetEngine in interface EngineHolder<CoreEngine>engine - The engine to storeEngineHolder.setEngine(Object)public boolean isDebug()
public void setDebug(boolean debug)
debug - To turn debug mode on or off (true | false)public GameDebugger getDebugger()
public InputManager getInputManager()
public void setInputManager(InputManager inputManager)
Copyright © 2014. All rights reserved.