Package com.csse3200.game.components
Class ShopInteractComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.input.InputComponent
com.csse3200.game.components.ShopInteractComponent
- All Implemented Interfaces:
com.badlogic.gdx.input.GestureDetector.GestureListener
,com.badlogic.gdx.InputProcessor
Press 0 near a shop (entity with ShopComponent) to trigger "interact".
-
Field Summary
Fields inherited from class com.csse3200.game.input.InputComponent
priority
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
keyPressed
(int keycode) An abstract method to be implemented by subclasses for specific key down events.protected boolean
keyReleased
(int keycode) An abstract method to be implemented by subclasses for specific key down events.Methods inherited from class com.csse3200.game.input.InputComponent
create, dispose, fling, getPriority, isPauseable, keyDown, keyTyped, keyUp, longPress, mouseMoved, pan, panStop, pinch, pinchStop, pinchStopHandled, scrolled, setPriority, tap, touchDown, touchDown, touchDragged, touchUp, zoom
Methods inherited from class com.csse3200.game.components.Component
earlyUpdate, getEntity, getPrio, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
ShopInteractComponent
public ShopInteractComponent(float rangeMeters)
-
-
Method Details
-
keyPressed
public boolean keyPressed(int keycode) Description copied from class:InputComponent
An abstract method to be implemented by subclasses for specific key down events. This method is called by theInputComponent.keyDown(int)
method.- Specified by:
keyPressed
in classInputComponent
- Parameters:
keycode
- The key code of the key that was pressed.- Returns:
- true if the even was handled, false otherwise
-
keyReleased
protected boolean keyReleased(int keycode) Description copied from class:InputComponent
An abstract method to be implemented by subclasses for specific key down events. This method is called by theInputComponent.keyUp(int)
method.- Specified by:
keyReleased
in classInputComponent
- Parameters:
keycode
- The key code of the key that was pressed.- Returns:
- True if the even was handled, false otherwise
-