mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-14 09:47:24 +07:00
Add unitSpawnEvent (#5876)
This commit is contained in:
@ -127,3 +127,4 @@ WilloIzCitron
|
||||
SAMBUYYA
|
||||
genNAowl
|
||||
TranquillyUnpleasant
|
||||
Darkness6030
|
||||
|
@ -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