Class GdxGame

java.lang.Object
com.badlogic.gdx.Game
com.deco2800.game.GdxGame
All Implemented Interfaces:
com.badlogic.gdx.ApplicationListener

public class GdxGame extends com.badlogic.gdx.Game
Entry point of the non-platform-specific game logic. Controls which screen is currently running. The current screen triggers transitions to other screens. This works similarly to a finite state machine (See the State Pattern).
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     
  • Field Summary

    Fields inherited from class com.badlogic.gdx.Game

    screen
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
     
    void
    Exit the game.
    void
    Sets the game's screen to a new screen of the provided type.

    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
  • Constructor Details

    • GdxGame

      public GdxGame()
  • Method Details

    • create

      public void create()
    • setScreen

      public void setScreen(GdxGame.ScreenType screenType)
      Sets the game's screen to a new screen of the provided type.
      Parameters:
      screenType - screen type
    • dispose

      public void dispose()
      Specified by:
      dispose in interface com.badlogic.gdx.ApplicationListener
      Overrides:
      dispose in class com.badlogic.gdx.Game
    • exit

      public void exit()
      Exit the game.