Class VroombaSuicideComponent

java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.enemy.VroombaSuicideComponent

public class VroombaSuicideComponent extends Component
Makes Vroomba behave like a suicide bomber: - When within triggerRadius of the player, start a short fuse. - On detonation, if the player is within damageRadius, apply damage. - Then kill self to trigger explosion particles via DeathParticleSpawnerComponent.
  • Constructor Details

    • VroombaSuicideComponent

      public VroombaSuicideComponent(Entity target, float triggerRadius, float damageRadius, int damage, float fuseSeconds)
  • 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