Class GdxGame

java.lang.Object
com.badlogic.gdx.Game
com.csse3200.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).
  • 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
    • setScreen

      public void setScreen(GdxGame.ScreenType screenType, GdxGame.CutsceneType cutsceneType)
    • getPreviousScreen

      public com.badlogic.gdx.Screen getPreviousScreen()
      Get the previous game's screen
      Returns:
      previous screen
    • getCurrentScreenType

      public GdxGame.ScreenType getCurrentScreenType()
      Get the previous game's screen
      Returns:
      previous screen
    • dispose

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

      public void setCurrentCutscene(Cutscene cutscene)
      Set the current cutscene being displayed.
      Parameters:
      cutscene - The active cutscene.
    • getCurrentCutscene

      public Cutscene getCurrentCutscene()
      Get the current cutscene being displayed.
      Returns:
      The active cutscene.
    • exit

      public void exit()
      Exit the game.