Add EntityDeathEvent and implementations

This commit is contained in:
KingRainbow44
2022-07-24 13:20:42 -04:00
parent a13725b1cb
commit 886c2e2f43
7 changed files with 50 additions and 20 deletions

View File

@@ -158,6 +158,8 @@ public class EntityMonster extends GameEntity {
@Override
public void onDeath(int killerId) {
super.onDeath(killerId); // Invoke super class's onDeath() method.
if (this.getSpawnEntry() != null) {
this.getScene().getDeadSpawnedEntities().add(getSpawnEntry());
}