Class ShopInteractComponent

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

public class ShopInteractComponent extends InputComponent
Press 0 near a shop (entity with ShopComponent) to trigger "interact".
  • Constructor Details

    • ShopInteractComponent

      public ShopInteractComponent(float rangeMeters)
  • Method Details

    • keyPressed

      public boolean keyPressed(int keycode)
      Description copied from class: InputComponent
      An abstract method to be implemented by subclasses for specific key down events. This method is called by the InputComponent.keyDown(int) method.
      Specified by:
      keyPressed in class InputComponent
      Parameters:
      keycode - The key code of the key that was pressed.
      Returns:
      true if the even was handled, false otherwise
    • keyReleased

      protected boolean keyReleased(int keycode)
      Description copied from class: InputComponent
      An abstract method to be implemented by subclasses for specific key down events. This method is called by the InputComponent.keyUp(int) method.
      Specified by:
      keyReleased in class InputComponent
      Parameters:
      keycode - The key code of the key that was pressed.
      Returns:
      True if the even was handled, false otherwise