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 TypeMethodDescriptionvoidcreate()Called when the entity is created and registered.booleanFlag for the calling ConstructionCommand that this building placement is done.booleanmouseMoved(int screenX, int screenY) booleantouchDown(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, zoomMethods 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:ComponentCalled 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:
createin classInputComponent
-
mouseMoved
public boolean mouseMoved(int screenX, int screenY) - Specified by:
mouseMovedin interfacecom.badlogic.gdx.InputProcessor- Overrides:
mouseMovedin classInputComponent- See Also:
-
InputProcessor.mouseMoved(int, 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)
-
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
-