Class VroombaSuicideComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.enemy.VroombaSuicideComponent
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.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionVroombaSuicideComponent
(Entity target, float triggerRadius, float damageRadius, int damage, float fuseSeconds) -
Method Summary
Modifier and TypeMethodDescriptionvoid
update()
Called once per frame of the game, and should be used for most component logic.Methods inherited from class com.csse3200.game.components.Component
create, dispose, earlyUpdate, getEntity, getPrio, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate
-
Constructor Details
-
VroombaSuicideComponent
public VroombaSuicideComponent(Entity target, float triggerRadius, float damageRadius, int damage, float fuseSeconds)
-
-
Method Details