Class OpenPauseComponent

java.lang.Object
com.deco2800.game.components.Component
com.deco2800.game.components.player.OpenPauseComponent

public class OpenPauseComponent extends Component
  • Constructor Details

    • OpenPauseComponent

      public OpenPauseComponent()
  • 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
    • getPauseOpen

      public Boolean getPauseOpen()
      Utility function to get pause menu open status.
      Returns:
      True if pause menu is open, else false
    • getKeyBindOpen

      public Boolean getKeyBindOpen()
      Utility function to get keybind menu open status.
      Returns:
      True if pause menu is open, else false
    • getPlayerGuideOpen

      public Boolean getPlayerGuideOpen()
      Utility function to get player guide menu open status.
      Returns:
      True if pause menu is open, else false
    • getInventoryToggled

      public Boolean getInventoryToggled()
      Utility function to get inventory menu open status.
      Returns:
      True if pause menu is open, else false
    • getOpenKeyBinds

      public OpenKeyBinds getOpenKeyBinds()
      Return the OpenKeyBinds component this utilises
      Returns:
      As above.
    • openPauseMenu

      public void openPauseMenu()
      Utility function to OPEN pause window and PAUSE the game.
    • openPlayerGuide

      public Boolean openPlayerGuide(int level, int pageNumber)
      Open the player guide menu and appropriately set the information page and asset based on the given pageNumber and level.
      Parameters:
      level - game level (either 1 or 2)
      pageNumber - number of the page, 1 indexing (page 1 = 1, page 1 != 0)
      Returns:
      True on success else false
    • closePlayerGuide

      public void closePlayerGuide()
      Utility function to CLOSE pause player guide window.
    • closePauseMenu

      public void closePauseMenu()
      Utility function to CLOSE pause window and UNPAUSE the game.
    • openKeyBindings

      public void openKeyBindings()
      Utility function to OPEN key binding window.
    • closeKeyBindings

      public void closeKeyBindings()
      Utility function to CLOSE key binding window.