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.GameTheGameis theApplicationListenershared by all platforms.- Author:
- ENG1 Team 23 (Cohort 3)
-
-
Field Summary
Fields Modifier and Type Field Description private com.badlogic.gdx.graphics.g2d.SpriteBatchbatchThe LibGDXSpriteBatchused during render-timeprivate com.badlogic.gdx.ScreenplayScreenThe LibGDXScreenarray used to store all activeGame-wideScreeninstantiationsprivate static floatPPM'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 voidcreate()Handles the creation of theApplicationvoiddispose()Releases all resources used by theGamestatic floatscaleToMetres(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 betweenGraphicsunits and in-game metres.- See Also:
scaleToMetres(float), Constant Field Values
-
batch
private com.badlogic.gdx.graphics.g2d.SpriteBatch batch
The LibGDXSpriteBatchused during render-time- See Also:
Drawable.render(SpriteBatch),Sprite
-
playScreen
private com.badlogic.gdx.Screen playScreen
The LibGDXScreenarray used to store all activeGame-wideScreeninstantiations- 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:
disposein interfacecom.badlogic.gdx.ApplicationListener- Overrides:
disposein classcom.badlogic.gdx.Game
-
-