Class Constants

java.lang.Object
com.mygdx.utils.Constants

public final class Constants
extends java.lang.Object
creates game constants and is updated when appropriate (I know some aren't technically constants)
  • Field Details

    • SCREEN_WIDTH

      public static int SCREEN_WIDTH
    • SCREEN_HEIGHT

      public static int SCREEN_HEIGHT
    • FULLSCREEN

      public static boolean FULLSCREEN
    • ASPECT_RATIO

      public static float ASPECT_RATIO
    • VIEWPORT_HEIGHT

      public static int VIEWPORT_HEIGHT
    • VIEWPORT_WIDTH

      public static int VIEWPORT_WIDTH
    • HALF_VIEWPORT_HEIGHT

      public static int HALF_VIEWPORT_HEIGHT
    • HALF_VIEWPORT_WIDTH

      public static int HALF_VIEWPORT_WIDTH
    • DIMENSIONS

      public static com.badlogic.gdx.math.Vector2 DIMENSIONS
    • HALF_DIMENSIONS

      public static com.badlogic.gdx.math.Vector2 HALF_DIMENSIONS
    • VIEWPORT_TITLE

      public static java.lang.String VIEWPORT_TITLE
    • PHYSICS_TIME_STEP

      public static float PHYSICS_TIME_STEP
    • ZOOM

      public static final float ZOOM
      See Also:
      Constant Field Values
    • VSYNC

      public static final boolean VSYNC
      See Also:
      Constant Field Values
    • BUILDING_SCALE

      public static final float BUILDING_SCALE
      See Also:
      Constant Field Values
    • TILE_SIZE

      public static float TILE_SIZE
    • BACKGROUND_COLOUR

      public static com.badlogic.gdx.math.Vector3 BACKGROUND_COLOUR
    • OPERATING_SYSTEM

      public static java.lang.String OPERATING_SYSTEM
  • Constructor Details

    • Constants

      public Constants()
  • Method Details

    • INIT_CONSTANTS

      public static void INIT_CONSTANTS()
      Create constants need so it can properly source screen dimensions
    • UPDATE_VIEWPORT

      public static void UPDATE_VIEWPORT​(int x, int y)
      Update viewport data on resize
      Parameters:
      x - new dim x
      y - new dim y