Package bytemusketeers.heslingtonhustle
Class HeslingtonHustle
- java.lang.Object
-
- com.badlogic.gdx.Game
-
- bytemusketeers.heslingtonhustle.HeslingtonHustle
-
- All Implemented Interfaces:
com.badlogic.gdx.ApplicationListener
public class HeslingtonHustle extends com.badlogic.gdx.Game
TheGame
is theApplicationListener
shared by all platforms.- Author:
- ENG1 Team 23 (Cohort 3)
-
-
Field Summary
Fields Modifier and Type Field Description private com.badlogic.gdx.graphics.g2d.SpriteBatch
batch
The LibGDXSpriteBatch
used during render-timeprivate com.badlogic.gdx.Screen
playScreen
The LibGDXScreen
array used to store all activeGame
-wideScreen
instantiationsprivate static float
PPM
'PPM' denotes the number of pixels-per-(in-game)-metre.
-
Constructor Summary
Constructors Constructor Description HeslingtonHustle()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
create()
Handles the creation of theApplication
void
dispose()
Releases all resources used by theGame
static float
scaleToMetres(float value)
Scales a pixel component to in-game metres
-
-
-
Field Detail
-
PPM
private static final float PPM
'PPM' denotes the number of pixels-per-(in-game)-metre. This is useful for converting betweenGraphics
units and in-game metres.- See Also:
scaleToMetres(float)
, Constant Field Values
-
batch
private com.badlogic.gdx.graphics.g2d.SpriteBatch batch
The LibGDXSpriteBatch
used during render-time- See Also:
Drawable.render(SpriteBatch)
,Sprite
-
playScreen
private com.badlogic.gdx.Screen playScreen
The LibGDXScreen
array used to store all activeGame
-wideScreen
instantiations- See Also:
Game.setScreen(Screen)
-
-
Method Detail
-
scaleToMetres
public static float scaleToMetres(float value)
Scales a pixel component to in-game metres- Parameters:
value
- The quantity to scale, in pixels- Returns:
- The corresponding quantity of in-game metres
-
create
public void create()
Handles the creation of theApplication
- See Also:
InvalidAreaException
-
dispose
public void dispose()
Releases all resources used by theGame
- Specified by:
dispose
in interfacecom.badlogic.gdx.ApplicationListener
- Overrides:
dispose
in classcom.badlogic.gdx.Game
-
-