Class CutsceneReaderComponent

java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.ui.cutscene.CutsceneReaderComponent

public class CutsceneReaderComponent extends Component
Component that can be attached to an entity representing a cutscene. Reads a script file for a cutscene and generates relevant structures for displaying the cutscene.
  • Constructor Details

    • CutsceneReaderComponent

      public CutsceneReaderComponent(String scriptPath)
      Constructs the component with a specified path to the script file it shall read.
      Parameters:
      scriptPath - The path to the script file being read
  • Method Details

    • create

      public void create()
      Description copied from class: Component
      Called when the entity is created and registered. Initial logic such as calls to GetComponent should be made here, not in the constructor which is called before an entity is finished.
      Overrides:
      create in class Component
    • getTextBoxes

      public List<CutsceneReaderComponent.TextBox> getTextBoxes()
      Getter method that returns the parsed text boxes from the parsed script file.
      Returns:
      A list containing text boxes in the order they were parsed.
    • getBackgrounds

      public String[] getBackgrounds()
      Method that returns a string array containing all background asset paths read.
      Returns:
      A string array containing all background assets.