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
CLass for keyboard inputs for birdie dash
-
Field Summary
Fields inherited from class com.csse3200.game.input.InputComponent
priority
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.csse3200.game.input.InputComponent
create, dispose, fling, getPriority, keyTyped, keyUp, longPress, mouseMoved, pan, panStop, pinch, pinchStop, pinchStopHandled, scrolled, setPriority, touchDown, touchDragged, touchUp, zoom
Methods inherited from class com.csse3200.game.components.Component
earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
KeyboardBirdInputComponent
public KeyboardBirdInputComponent()
-
-
Method Details
-
keyDown
public boolean keyDown(int keycode) Define keys for events- Specified by:
keyDown
in interfacecom.badlogic.gdx.InputProcessor
- Overrides:
keyDown
in classInputComponent
- Parameters:
keycode
- one of the constants in Input.Keys- Returns:
- true if key pressed
- See Also:
-
touchDown
public boolean touchDown(int screenX, int screenY, int pointer, int button) - Specified by:
touchDown
in interfacecom.badlogic.gdx.InputProcessor
- Overrides:
touchDown
in classInputComponent
- See Also:
-
tap
public boolean tap(float x, float y, int count, int button) - Specified by:
tap
in interfacecom.badlogic.gdx.input.GestureDetector.GestureListener
- Overrides:
tap
in classInputComponent
- See Also:
-