Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1,10 +1,12 @@
|
|||||||
package mindustry.entities.comp;
|
package mindustry.entities.comp;
|
||||||
|
|
||||||
|
import arc.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import arc.math.geom.*;
|
import arc.math.geom.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import mindustry.annotations.Annotations.*;
|
import mindustry.annotations.Annotations.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
|
import mindustry.game.EventType.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.world.blocks.environment.*;
|
import mindustry.world.blocks.environment.*;
|
||||||
|
|
||||||
@@ -90,7 +92,7 @@ abstract class FlyingComp implements Posc, Velc, Healthc, Hitboxc{
|
|||||||
//TODO is the netClient check necessary?
|
//TODO is the netClient check necessary?
|
||||||
if(drownTime >= 0.999f && !net.client()){
|
if(drownTime >= 0.999f && !net.client()){
|
||||||
kill();
|
kill();
|
||||||
//TODO drown event!
|
Events.fire(new UnitDrownEvent(self()));
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
drownTime = Mathf.lerpDelta(drownTime, 0f, 0.03f);
|
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 static class UnitCreateEvent{
|
||||||
public final Unit unit;
|
public final Unit unit;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user