mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-22 02:07:20 +07:00
Fixed #9761
This commit is contained in:
parent
4c4476ae95
commit
caf9f2a6e3
@ -14,6 +14,7 @@ import mindustry.entities.EntityCollisions.*;
|
|||||||
import mindustry.entities.*;
|
import mindustry.entities.*;
|
||||||
import mindustry.game.EventType.*;
|
import mindustry.game.EventType.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
|
import mindustry.graphics.*;
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
|
|
||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
@ -153,6 +154,8 @@ public class UnitPayload implements Payload{
|
|||||||
|
|
||||||
//draw warning
|
//draw warning
|
||||||
if(overlayTime > 0){
|
if(overlayTime > 0){
|
||||||
|
float z = Draw.z();
|
||||||
|
Draw.z(Layer.groundUnit + 1f);
|
||||||
var region = overlayRegion == null ? Icon.warning.getRegion() : overlayRegion;
|
var region = overlayRegion == null ? Icon.warning.getRegion() : overlayRegion;
|
||||||
Draw.color(Color.scarlet);
|
Draw.color(Color.scarlet);
|
||||||
Draw.alpha(0.8f * Interp.exp5Out.apply(overlayTime));
|
Draw.alpha(0.8f * Interp.exp5Out.apply(overlayTime));
|
||||||
@ -163,6 +166,7 @@ public class UnitPayload implements Payload{
|
|||||||
Draw.reset();
|
Draw.reset();
|
||||||
|
|
||||||
overlayTime = Math.max(overlayTime - Time.delta/overlayDuration, 0f);
|
overlayTime = Math.max(overlayTime - Time.delta/overlayDuration, 0f);
|
||||||
|
Draw.z(z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user