Add unitSpawnEvent (#5876)
This commit is contained in:
@@ -196,6 +196,7 @@ public class WaveSpawner{
|
||||
unit.apply(StatusEffects.invincible, 60f);
|
||||
unit.add();
|
||||
|
||||
Events.fire(new UnitSpawnEvent(unit));
|
||||
Call.spawnEffect(unit.x, unit.y, unit.rotation, unit.type);
|
||||
}
|
||||
|
||||
|
||||
@@ -428,6 +428,15 @@ public class EventType{
|
||||
}
|
||||
}
|
||||
|
||||
/** Called when a unit is spawned by wave. */
|
||||
public static class UnitSpawnEvent{
|
||||
public final Unit unit;
|
||||
|
||||
public UnitSpawnEvent(Unit unit) {
|
||||
this.unit = unit;
|
||||
}
|
||||
}
|
||||
|
||||
/** Called when a unit is dumped from any payload block. */
|
||||
public static class UnitUnloadEvent{
|
||||
public final Unit unit;
|
||||
|
||||
Reference in New Issue
Block a user