Class UpgradeUIComponent

All Implemented Interfaces:
com.badlogic.gdx.input.GestureDetector.GestureListener, com.badlogic.gdx.InputProcessor

public class UpgradeUIComponent extends InputComponent
  • Constructor Details

    • UpgradeUIComponent

      public UpgradeUIComponent(com.badlogic.gdx.graphics.Camera camera, com.badlogic.gdx.scenes.scene2d.Stage stage)
      Constructor for the UpgradeUIComponent
      Parameters:
      camera - the camera to be used, this is the camera that the game is rendered with
  • Method Details

    • getCamera

      public com.badlogic.gdx.graphics.Camera getCamera()
      Getter for the camera
      Returns:
      the camera
    • getStage

      public com.badlogic.gdx.scenes.scene2d.Stage getStage()
      Getter for the stage
      Returns:
      the stage
    • touchDown

      public boolean touchDown(int screenX, int screenY, int pointer, int button)
      Method to handle the touch down event
      Specified by:
      touchDown in interface com.badlogic.gdx.InputProcessor
      Overrides:
      touchDown in class InputComponent
      Parameters:
      screenX - the x coordinate of the touch
      screenY - the y coordinate of the touch
      pointer - the pointer
      button - the button
      See Also:
      • InputProcessor.touchDown(int, int, int, int)
    • checkForDispose

      public void checkForDispose()
      Update method for the UpgradeUIComponent, checks if the entity is disposed and removes the upgrade table