Class OpenPauseComponent
java.lang.Object
com.deco2800.game.components.Component
com.deco2800.game.components.player.OpenPauseComponent
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Utility function to CLOSE key binding window.void
Utility function to CLOSE pause window and UNPAUSE the game.void
Utility function to CLOSE pause player guide window.void
create()
Called when the entity is created and registered.Utility function to get inventory menu open status.Utility function to get keybind menu open status.Return the OpenKeyBinds component this utilisesUtility function to get pause menu open status.Utility function to get player guide menu open status.void
Utility function to OPEN key binding window.void
Utility function to OPEN pause window and PAUSE the game.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.Methods inherited from class com.deco2800.game.components.Component
dispose, earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
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. -
getPauseOpen
Utility function to get pause menu open status.- Returns:
- True if pause menu is open, else false
-
getKeyBindOpen
Utility function to get keybind menu open status.- Returns:
- True if pause menu is open, else false
-
getPlayerGuideOpen
Utility function to get player guide menu open status.- Returns:
- True if pause menu is open, else false
-
getInventoryToggled
Utility function to get inventory menu open status.- Returns:
- True if pause menu is open, else false
-
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
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.
-