Class MainGameScreen

java.lang.Object
com.badlogic.gdx.ScreenAdapter
com.csse3200.game.screens.MainGameScreen
All Implemented Interfaces:
com.badlogic.gdx.Screen

public class MainGameScreen extends com.badlogic.gdx.ScreenAdapter
The game screen containing the main game.

Details on libGDX screens: https://happycoding.io/tutorials/libgdx/game-screens

  • Field Details

    • game

      protected final GdxGame game
    • renderer

      protected final Renderer renderer
    • physicsEngine

      protected final PhysicsEngine physicsEngine
    • waveManager

      protected final WaveManager waveManager
    • gameArea

      protected LevelGameArea gameArea
    • isPaused

      protected boolean isPaused
  • Constructor Details

    • MainGameScreen

      public MainGameScreen(GdxGame game)
      Constructor for the main game screen.
      Parameters:
      game - the game instance
  • Method Details

    • render

      public void render(float delta)
      Specified by:
      render in interface com.badlogic.gdx.Screen
      Overrides:
      render in class com.badlogic.gdx.ScreenAdapter
    • resize

      public void resize(int width, int height)
      Specified by:
      resize in interface com.badlogic.gdx.Screen
      Overrides:
      resize in class com.badlogic.gdx.ScreenAdapter
    • dispose

      public void dispose()
      Specified by:
      dispose in interface com.badlogic.gdx.Screen
      Overrides:
      dispose in class com.badlogic.gdx.ScreenAdapter
    • createUI

      protected void createUI()
      Creates the main game's ui including components for rendering ui elements to* the screen and capturing and handling ui input.
    • createGameArea

      protected LevelGameArea createGameArea()
      Factory method for creating the game area. Automatically detects whether to create a regular level or slot machine area based on the level configuration.