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

public class ConstructionInputComponent extends InputComponent
  • Constructor Details

    • ConstructionInputComponent

      public ConstructionInputComponent(Entity highlight, BuildingType type)
  • 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 class InputComponent
    • mouseMoved

      public boolean mouseMoved(int screenX, int screenY)
      Specified by:
      mouseMoved in interface com.badlogic.gdx.InputProcessor
      Overrides:
      mouseMoved in class InputComponent
      See Also:
      • InputProcessor.mouseMoved(int, int)
    • touchDown

      public boolean touchDown(int screenX, int screenY, int pointer, int button)
      Specified by:
      touchDown in interface com.badlogic.gdx.InputProcessor
      Overrides:
      touchDown in class InputComponent
      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