Class CutsceneArea

java.lang.Object
com.csse3200.game.areas.GameArea
com.csse3200.game.ui.cutscene.CutsceneArea
All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable

public class CutsceneArea extends GameArea
Special game area that can be used to display a cutscene. Works as a game level, so can be transitioned into from another.
  • Constructor Details

    • CutsceneArea

      public CutsceneArea(String scriptPath)
      Constructor for creating the game area representing cutscene.
      Parameters:
      scriptPath - The file path to the cutscene script to be given to the reader component
  • Method Details

    • loadPrerequisites

      protected void loadPrerequisites()
      There are no pre-reqs for cutscene areas
      Specified by:
      loadPrerequisites in class GameArea
    • loadEntities

      protected void loadEntities()
      Creates a reader entity with parses a script file, then an entity for displaying/handling UI. Additionally, this method creates a dummy player (requirement of GameArea)
      Specified by:
      loadEntities in class GameArea
    • loadAssets

      protected void loadAssets()
      Private method for loading all assets into the resource service. This includes dummy assets for the minimap and player, as well as backgrounds for the cutscene
      Specified by:
      loadAssets in class GameArea
    • reset

      protected void reset()
      Cutscene areas cannot be reset
      Overrides:
      reset in class GameArea
    • spawnPlayer

      protected Entity spawnPlayer()
      Create dummy player for cutscene
      Specified by:
      spawnPlayer in class GameArea
      Returns:
      player entity
    • spawnPlayer

      protected Entity spawnPlayer(List<Component> componentList)
      Create dummy player for cutscene
      Specified by:
      spawnPlayer in class GameArea
      Parameters:
      componentList -
      Returns:
      Player entity with old components
    • dispose

      public void dispose()
      Correctly unregisters the player, any assets loaded, and entities created for the cutscene
      Specified by:
      dispose in interface com.badlogic.gdx.utils.Disposable
      Overrides:
      dispose in class GameArea