Package com.csse3200.game.components
Class DeathComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.DeathComponent
When this entity (usually killable entities) has health = 0, it disposes the
enemy form the field of play.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.csse3200.game.components.Component
dispose, earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
DeathComponent
public DeathComponent()
-
-
Method Details
-
create
public void create()Creates a new listener on an entity to wait for kill condition -
kill
public void kill(com.badlogic.gdx.physics.box2d.Fixture me, com.badlogic.gdx.physics.box2d.Fixture other) When kill condition met, target entity will be disposed.- Parameters:
me
- The current Entity's Fixtureother
- The targeted Entity's Fixture
-