Class DropInputComponent

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

public class DropInputComponent extends InputComponent
  • Constructor Details

    • DropInputComponent

      public DropInputComponent(com.badlogic.gdx.graphics.Camera camera)
      Constructor for the DropInputComponent
      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
    • touchDown

      public boolean touchDown(int screenX, int screenY, int pointer, int button)
      When the mouse is clicked, this method is called. It checks if the mouse is clicked on a drop entity and if it is, it adds the value of the drop to the scrap
      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:
      See Also:
      • InputProcessor.touchDown(int, int, int, int)