Class HeslingtonHustle

  • All Implemented Interfaces:
    com.badlogic.gdx.ApplicationListener

    public class HeslingtonHustle
    extends com.badlogic.gdx.Game
    The Game is the ApplicationListener 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 LibGDX SpriteBatch used during render-time
      private com.badlogic.gdx.Screen playScreen
      The LibGDX Screen array used to store all active Game-wide Screen instantiations
      private static float PPM
      'PPM' denotes the number of pixels-per-(in-game)-metre.
      • Fields inherited from class com.badlogic.gdx.Game

        screen
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void create()
      Handles the creation of the Application
      void dispose()
      Releases all resources used by the Game
      static float scaleToMetres​(float value)
      Scales a pixel component to in-game metres
      • Methods inherited from class com.badlogic.gdx.Game

        getScreen, pause, render, resize, resume, setScreen
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PPM

        private static final float PPM
        'PPM' denotes the number of pixels-per-(in-game)-metre. This is useful for converting between Graphics units and in-game metres.
        See Also:
        scaleToMetres(float), Constant Field Values
      • batch

        private com.badlogic.gdx.graphics.g2d.SpriteBatch batch
        The LibGDX SpriteBatch used during render-time
        See Also:
        Drawable.render(SpriteBatch), Sprite
      • playScreen

        private com.badlogic.gdx.Screen playScreen
        The LibGDX Screen array used to store all active Game-wide Screen instantiations
        See Also:
        Game.setScreen(Screen)
    • Constructor Detail

      • HeslingtonHustle

        public HeslingtonHustle()
    • 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 the Application
        See Also:
        InvalidAreaException
      • dispose

        public void dispose()
        Releases all resources used by the Game
        Specified by:
        dispose in interface com.badlogic.gdx.ApplicationListener
        Overrides:
        dispose in class com.badlogic.gdx.Game