Package com.mygdx.game.UI
Class GameScreen
- java.lang.Object
-
- com.badlogic.gdx.ScreenAdapter
-
- com.mygdx.game.UI.Page
-
- com.mygdx.game.UI.GameScreen
-
- All Implemented Interfaces:
com.badlogic.gdx.Screen
public class GameScreen extends Page
-
-
Constructor Summary
Constructors Constructor Description GameScreen(PirateGame parent, int id_map)
Boots up the actual game: starts PhysicsManager, GameManager, EntityManager, loads texture atlases into ResourceManager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
CreateActors()
Draw UI elements showing player health, plunder, ammo, and points.void
dispose()
Disposes of all stuff.void
render(float delta)
Called every frame.void
resize(int width, int height)
Resize camera, effectively setting the viewport to display game assets at pixel ratios other than 1:1.protected void
update()
Update the UI with new values for health, quest status, etc.
-
-
-
Constructor Detail
-
GameScreen
public GameScreen(PirateGame parent, int id_map)
Boots up the actual game: starts PhysicsManager, GameManager, EntityManager, loads texture atlases into ResourceManager. Draws quest and control info.- Parameters:
parent
- PirateGame UI screen containerid_map
- the resource id of the tile map
-
-
Method Detail
-
render
public void render(float delta)
Called every frame. Calls all other functions that need to be called every frame by raising events and update methods.
-
dispose
public void dispose()
Disposes of all stuff. If something is missing from this method you will get memory leaks.- Specified by:
dispose
in interfacecom.badlogic.gdx.Screen
- Overrides:
dispose
in classcom.badlogic.gdx.ScreenAdapter
-
resize
public void resize(int width, int height)
Resize camera, effectively setting the viewport to display game assets at pixel ratios other than 1:1.
-
update
protected void update()
Update the UI with new values for health, quest status, etc. also called once per frame but used for actors by my own convention
-
CreateActors
protected void CreateActors()
Draw UI elements showing player health, plunder, ammo, and points.- Specified by:
CreateActors
in classPage
-
-