mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-04-27 16:00:51 -07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
c49b3124d5
2 changed files with 11 additions and 1 deletions
|
|
@ -1,10 +1,12 @@
|
|||
package mindustry.entities.comp;
|
||||
|
||||
import arc.*;
|
||||
import arc.math.*;
|
||||
import arc.math.geom.*;
|
||||
import arc.util.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.game.EventType.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.world.blocks.environment.*;
|
||||
|
||||
|
|
@ -90,7 +92,7 @@ abstract class FlyingComp implements Posc, Velc, Healthc, Hitboxc{
|
|||
//TODO is the netClient check necessary?
|
||||
if(drownTime >= 0.999f && !net.client()){
|
||||
kill();
|
||||
//TODO drown event!
|
||||
Events.fire(new UnitDrownEvent(self()));
|
||||
}
|
||||
}else{
|
||||
drownTime = Mathf.lerpDelta(drownTime, 0f, 0.03f);
|
||||
|
|
|
|||
|
|
@ -270,6 +270,14 @@ public class EventType{
|
|||
}
|
||||
}
|
||||
|
||||
public static class UnitDrownEvent{
|
||||
public final Unit unit;
|
||||
|
||||
public UnitDrownEvent(Unit unit){
|
||||
this.unit = unit;
|
||||
}
|
||||
}
|
||||
|
||||
public static class UnitCreateEvent{
|
||||
public final Unit unit;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue