Package com.csse3200.game.components
Class DeckInputComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.input.InputComponent
com.csse3200.game.components.DeckInputComponent
- All Implemented Interfaces:
com.badlogic.gdx.input.GestureDetector.GestureListener
,com.badlogic.gdx.InputProcessor
Input handler for inventory units for mouse input. This input handler uses touch input.
-
Field Summary
Fields inherited from class com.csse3200.game.input.InputComponent
inputPriority
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGetter for the supplier, used when we need an instance of the inventory unitboolean
touchDown
(int screenX, int screenY, int pointer, int button) Action on mouse click on entityMethods inherited from class com.csse3200.game.input.InputComponent
create, dispose, fling, getInputPriority, keyDown, keyTyped, keyUp, longPress, mouseMoved, pan, panStop, pinch, pinchStop, pinchStopHandled, scrolled, setInputPriority, tap, touchDown, touchDragged, touchUp, zoom
Methods inherited from class com.csse3200.game.components.Component
earlyUpdate, getEntity, getPriority, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
DeckInputComponent
-
-
Method Details
-
getEntitySupplier
Getter for the supplier, used when we need an instance of the inventory unit- Returns:
- the supplier for that entity
-
touchDown
public boolean touchDown(int screenX, int screenY, int pointer, int button) Action on mouse click on entity- Specified by:
touchDown
in interfacecom.badlogic.gdx.InputProcessor
- Overrides:
touchDown
in classInputComponent
- Parameters:
screenX
- The x coordinate, origin is in the upper left cornerscreenY
- The y coordinate, origin is in the upper left cornerpointer
- the pointer for the event.button
- the button- Returns:
- true if action taken, otherwise false
- See Also:
-