Class MissueAttackComponent

java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.boss.MissueAttackComponent

public class MissueAttackComponent extends Component
Spawns random ground warnings at a fixed cooldown; after a short warning time, a missile is spawned above that position and falls straight down.

Usage: - Attach this component to a boss. - Call setAttack(true) to start the periodic warning/missile cycle. - Call setAttack(false) to stop it.

Notes: - World/random range is controlled by minX/maxX and minY/maxY. - Only visuals are created for warnings; the entity is disposed when the missile launches.

  • Constructor Details

    • MissueAttackComponent

      public MissueAttackComponent()
  • Method Details

    • update

      public void update()
      Description copied from class: Component
      Called once per frame of the game, and should be used for most component logic. Not called if component is disabled.
      Overrides:
      update in class Component
    • dispose

      public void dispose()
      Clean up any lingering warning visuals when this component is disposed.
      Overrides:
      dispose in class Component
    • setAttack

      public void setAttack(boolean attack)
      Enable/disable the attack cycle.