Class TouchCompanionInputComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.input.InputComponent
com.csse3200.game.components.Companion.TouchCompanionInputComponent
- All Implemented Interfaces:
com.badlogic.gdx.input.GestureDetector.GestureListener,com.badlogic.gdx.InputProcessor
TouchCompanionInputComponent handles touch input to control a companion character.
-
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, longPress, mouseMoved, pan, panStop, pinch, pinchStop, pinchStopHandled, scrolled, setPriority, tap, touchDown, touchDragged, touchUp, zoomMethods inherited from class com.csse3200.game.components.Component
earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
TouchCompanionInputComponent
public TouchCompanionInputComponent()
-
-
Method Details
-
keyDown
public boolean keyDown(int keycode) - Specified by:
keyDownin interfacecom.badlogic.gdx.InputProcessor- Overrides:
keyDownin classInputComponent- See Also:
-
InputProcessor.keyDown(int)
-
keyUp
public boolean keyUp(int keycode) - Specified by:
keyUpin interfacecom.badlogic.gdx.InputProcessor- Overrides:
keyUpin classInputComponent- See Also:
-
InputProcessor.keyUp(int)
-
touchDown
public boolean touchDown(int screenX, int screenY, int pointer, int button) - Specified by:
touchDownin interfacecom.badlogic.gdx.InputProcessor- Overrides:
touchDownin classInputComponent- See Also:
-
InputProcessor.touchDown(int, int, int, int)
-