Class DeckInputComponent

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

public class DeckInputComponent extends InputComponent
Input handler for inventory units for mouse input. This input handler uses touch input.
  • Constructor Details

  • Method Details

    • getEntitySupplier

      public Supplier<Entity> getEntitySupplier()
      Getter for the supplier, used when we need an instance of the inventory unit
      Returns:
      the supplier for that entity
    • touchDown

      public boolean touchDown(int screenX, int screenY, int pointer, int button)
      Action on mouse click on entity
      Specified by:
      touchDown in interface com.badlogic.gdx.InputProcessor
      Overrides:
      touchDown in class InputComponent
      Parameters:
      screenX - The x coordinate, origin is in the upper left corner
      screenY - The y coordinate, origin is in the upper left corner
      pointer - the pointer for the event.
      button - the button
      Returns:
      true if action taken, otherwise false
      See Also:
      • InputProcessor.touchDown(int, int, int, int)