Package com.csse3200.game.components
Class SelfDestructComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.SelfDestructComponent
Handles logic for a drone that self-destructs within collision radius of player.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSelfDestructComponent(Entity target) Constructor takes the entity to target (usually the player). -
Method Summary
Methods inherited from class com.csse3200.game.components.Component
dispose, earlyUpdate, getEntity, getPrio, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate
-
Constructor Details
-
SelfDestructComponent
Constructor takes the entity to target (usually the player).
-
-
Method Details
-
create
public void create()Called when the component is created. Sets up event listeners for handling cleanup after explosion. -
update
public void update()Description copied from class:ComponentCalled once per frame of the game, and should be used for most component logic. Not called if component is disabled.
-