Class OrderActions

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

public class OrderActions extends InputComponent
This class listens to key presses to shift dockets left and right and handles order-related actions in the game.
  • Constructor Details

    • OrderActions

      public OrderActions()
      Constructs an OrderActions instance.
  • Method Details

    • create

      public void create()
      Initialises the OrderActions component by registering input listeners and event listeners for order-related actions.
      Overrides:
      create in class InputComponent
    • keyDown

      public boolean keyDown(int keycode)
      Handles key press events. Shifts dockets left or right based on the pressed key.
      Specified by:
      keyDown in interface com.badlogic.gdx.InputProcessor
      Overrides:
      keyDown in class InputComponent
      Parameters:
      keycode - the code of the pressed key
      Returns:
      true if the key event was handled, false otherwise
      See Also:
      • InputProcessor.keyDown(int)
    • keyUp

      public boolean keyUp(int keycode)
      Specified by:
      keyUp in interface com.badlogic.gdx.InputProcessor
      Overrides:
      keyUp in class InputComponent
      See Also:
      • InputProcessor.keyUp(int)
    • keyTyped

      public boolean keyTyped(char character)
      Specified by:
      keyTyped in interface com.badlogic.gdx.InputProcessor
      Overrides:
      keyTyped in class InputComponent
      See Also:
      • InputProcessor.keyTyped(char)
    • getLogger

      public org.slf4j.Logger getLogger()
      Get the logger instance for testing purposes.
      Returns:
      the logger instance.