Class ConstructionInputComponent
java.lang.Object
com.deco2800.game.components.Component
com.deco2800.game.input.InputComponent
com.deco2800.game.components.building.ConstructionInputComponent
- All Implemented Interfaces:
com.badlogic.gdx.input.GestureDetector.GestureListener
,com.badlogic.gdx.InputProcessor
-
Field Summary
Fields inherited from class com.deco2800.game.input.InputComponent
priority
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
create()
Called when the entity is created and registered.boolean
Flag for the calling ConstructionCommand that this building placement is done.boolean
mouseMoved
(int screenX, int screenY) boolean
touchDown
(int screenX, int screenY, int pointer, int button) Methods inherited from class com.deco2800.game.input.InputComponent
dispose, fling, getPriority, keyDown, keyTyped, keyUp, longPress, pan, panStop, pinch, pinchStop, pinchStopHandled, scrolled, setPriority, tap, touchDown, touchDragged, touchUp, zoom
Methods inherited from class com.deco2800.game.components.Component
earlyUpdate, getEntity, isAnimationRenderComponent, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
ConstructionInputComponent
-
-
Method Details
-
create
public void create()Description copied from class:Component
Called when the entity is created and registered. Initial logic such as calls to GetComponent should be made here, not in the constructor which is called before an entity is finished.- Overrides:
create
in classInputComponent
-
mouseMoved
public boolean mouseMoved(int screenX, int screenY) - Specified by:
mouseMoved
in interfacecom.badlogic.gdx.InputProcessor
- Overrides:
mouseMoved
in classInputComponent
- See Also:
-
InputProcessor.mouseMoved(int, int)
-
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:
-
InputProcessor.touchDown(int, int, int, int)
-
isFinished
public boolean isFinished()Flag for the calling ConstructionCommand that this building placement is done.- Returns:
- whether this building process has been cancelled or completed
-