Class ToggleableMap

All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, com.badlogic.gdx.utils.Json.Serializable, Renderable, Comparable<Renderable>

public class ToggleableMap extends UIComponent
  • Constructor Details

    • ToggleableMap

      public ToggleableMap()
  • Method Details

    • create

      public void create()
      Creates reusable ui styles and adds actors to the stage.
      Overrides:
      create in class UIComponent
    • dimScreen

      public void dimScreen()
      Dim the screen when the map is open (Thang: should I pause the game too?)
    • toggleOpen

      public void toggleOpen(Boolean isOpen)
      Toggles the map open or closed and updates the display.
      Parameters:
      isOpen - Whether the map is open or not.
    • inPlayerPos

      public boolean inPlayerPos(ArrayList<com.badlogic.gdx.math.GridPoint2> listPlayerPos, com.badlogic.gdx.math.GridPoint2 gpPos)
      Check if the given position is in the list of player's position
      Parameters:
      listPlayerPos - list of player's position
      gpPos - position to check
      Returns:
      true if the given position is in the list of player's position
    • createAssets

      public void createAssets()
      Creates assets used
    • draw

      public void draw(com.badlogic.gdx.graphics.g2d.SpriteBatch batch)
      Draws the actors to the game.
      Specified by:
      draw in class RenderComponent
      Parameters:
      batch - Batch to render to.
    • pauseGame

      public void pauseGame()
    • unPauseGame

      public void unPauseGame()
      Unpauses the game
    • dispose

      public void dispose()
      Destroys the UI objects
      Specified by:
      dispose in interface com.badlogic.gdx.utils.Disposable
      Overrides:
      dispose in class RenderComponent
    • removeExternalUI

      public void removeExternalUI()
      Removes the UI components on the screen so that cutscene is not so cluttered
    • recoverExternalUI

      public void recoverExternalUI()
      Recovers the UI components that were removed back onto the screen