Class ObstacleEventHandler

java.lang.Object
com.deco2800.game.components.Component
com.deco2800.game.components.obstacle.ObstacleEventHandler

public class ObstacleEventHandler
extends Component
Used to handle events of obstacles and enemies
  • Field Details

    • locked

      public static boolean locked
    • locked2

      public static boolean locked2
    • locked3

      public static boolean locked3
    • locked_ufo

      public static boolean locked_ufo
  • Constructor Details

  • 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 Component
    • setSpaceshipAttack

      public static void setSpaceshipAttack​(boolean spaceshipAttack)
      Setter for spaceshipAttack, used for test.
      Parameters:
      spaceshipAttack - : space ship attack or not
    • isLocked

      public static boolean isLocked()
      getter method for locked
      Returns:
      if the plant is locked
    • isLocked2

      public static boolean isLocked2()
      getter method for locked2
      Returns:
      if the thorns is locked
    • isLocked3

      public static boolean isLocked3()
      getter method for locked3
      Returns:
      if the meteorite is locked
    • isLocked_ufo

      public static boolean isLocked_ufo()
      getter method for locked_ufo
      Returns:
      if the spaceship is locked
    • isSpaceshipAttack

      public static boolean isSpaceshipAttack()
      getter method for spaceshipAttack
      Returns:
      if the spaceshipAttack is attack