Bandidos
|
Public Member Functions | |
Engine (String title, int width, int height, int scale, int frameRate, BaseTextureResources textureResources, BaseAudioResources audioResources, BaseFontResources fontResources) | |
void | setScenesManager (BaseScenesManager manager) |
void | update () |
Static Public Member Functions | |
static AssetManager | getAssetManager () |
static BaseScenesManager | getSceneManager () |
static BaseFontResources | getFontResources () |
static BaseTextureResources | getTextureResources () |
static BaseAudioResources | getAudioResources () |
static String | getTitle () |
static int | getWidth () |
static int | getHeight () |
static int | getFrameRate () |
static float | getFrameStep () |
Static Public Attributes | |
static float | TimeScale = 1f |
This class should be instantiated at the core of the workspace. It will be the holder and handler for all the core Game Systems and should be updated for it to run. It will handle its own Update loop and will keep it at the given FrameRate. Create a window with the given width, height and title and will hold all the Resources If you want to load a resource, know the size of the screen, get access to scene management or rendering. They are all available as static fields which can be accessed by any class.
com.mygdx.game.engine.Engine.Engine | ( | String | title, |
int | width, | ||
int | height, | ||
int | scale, | ||
int | frameRate, | ||
BaseTextureResources | textureResources, | ||
BaseAudioResources | audioResources, | ||
BaseFontResources | fontResources | ||
) |
This creates the core of the game system. The Engine should be updated in a loop by calling the 'update' method Do not forget to call the 'setScenesManager' method to set the scene manager.
title | to give the game window |
width | is the width to make the game window in pixels |
height | is the height to make the game window in pixels |
scale | is how much to scale the window size (width and height) |
frameRate | is the frame rate the game should run on (60 fps recommended) |
textureResources | is the texture resources instance which has the loadResource calls for all the game textures |
audioResources | is the audio resources instance which has the loadResource calls for all the game audio |
fontResources | is the font resources instance which has the loadResource calls for all the game fonts |
|
static |
Returns the AssetManager which is keeps track on how much is loaded of all the resources
|
static |
|
static |
|
static |
Returns the given Frame Rate of the game
|
static |
Gets the Time it would take to complete a single frame.
|
static |
Returns the real height of the screen
|
static |
Gets the SceneManager set with the 'setScenesManager' method
|
static |
|
static |
Returns the Title of the application given to the Engine
|
static |
Returns the real width of the screen
void com.mygdx.game.engine.Engine.setScenesManager | ( | BaseScenesManager | manager | ) |
Sets the scene manager of the Engine.
manager | is the Scene Manager which should be put as static scene manager. |
void com.mygdx.game.engine.Engine.update | ( | ) |
Updates the entire Engine with all the rendering and scene managing
|
static |
The scale on which the game is running. (This will effect all game Delta Time) [DEFAULT VALUE: 1f]