Class KeyboardBirdInputComponent

java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.input.InputComponent
com.csse3200.game.minigames.birdiedash.controller.KeyboardBirdInputComponent
All Implemented Interfaces:
com.badlogic.gdx.input.GestureDetector.GestureListener, com.badlogic.gdx.InputProcessor

public class KeyboardBirdInputComponent extends InputComponent
CLass for keyboard inputs for birdie dash
  • Constructor Details

    • KeyboardBirdInputComponent

      public KeyboardBirdInputComponent()
  • Method Details

    • keyDown

      public boolean keyDown(int keycode)
      Define keys for events
      Specified by:
      keyDown in interface com.badlogic.gdx.InputProcessor
      Overrides:
      keyDown in class InputComponent
      Parameters:
      keycode - one of the constants in Input.Keys
      Returns:
      true if key pressed
      See Also:
      • InputProcessor.keyDown(int)
    • touchDown

      public boolean touchDown(int screenX, int screenY, int pointer, int button)
      Specified by:
      touchDown in interface com.badlogic.gdx.InputProcessor
      Overrides:
      touchDown in class InputComponent
      See Also:
      • InputProcessor.touchDown(int, int, int, int)
    • tap

      public boolean tap(float x, float y, int count, int button)
      Specified by:
      tap in interface com.badlogic.gdx.input.GestureDetector.GestureListener
      Overrides:
      tap in class InputComponent
      See Also:
      • GestureDetector.GestureListener.tap(float, float, int, int)