mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-11 11:17:11 +07:00
Enemy indicators
This commit is contained in:
parent
8269d842ce
commit
91741ec29c
@ -404,7 +404,7 @@ category.crafting = Input/Output
|
||||
category.shooting = Shooting
|
||||
category.optional = Optional Enhancements
|
||||
setting.animatedwater.name = Animated Water
|
||||
setting.indicators.name = Ally Indicators
|
||||
setting.indicators.name = Enemy/Ally Indicators
|
||||
setting.autotarget.name = Auto-Target
|
||||
setting.fpscap.name = Max FPS
|
||||
setting.fpscap.none = None
|
||||
@ -517,8 +517,8 @@ liquid.oil.name = Oil
|
||||
liquid.cryofluid.name = Cryofluid
|
||||
mech.alpha-mech.name = Alpha
|
||||
mech.alpha-mech.weapon = Heavy Repeater
|
||||
mech.alpha-mech.ability = Drone Swarm
|
||||
mech.alpha-mech.description = The standard mech. Has decent speed and damage output; can create up to 3 drones for increased offensive capability.
|
||||
mech.alpha-mech.ability = None
|
||||
mech.alpha-mech.description = The standard mech. Has decent speed and damage output.
|
||||
mech.delta-mech.name = Delta
|
||||
mech.delta-mech.weapon = Arc Generator
|
||||
mech.delta-mech.ability = Discharge
|
||||
|
@ -10,6 +10,7 @@ import io.anuke.arc.math.geom.Vector2;
|
||||
import io.anuke.arc.util.Time;
|
||||
import io.anuke.arc.util.Tmp;
|
||||
import io.anuke.mindustry.content.Blocks;
|
||||
import io.anuke.mindustry.entities.Units;
|
||||
import io.anuke.mindustry.entities.type.Player;
|
||||
import io.anuke.mindustry.game.Team;
|
||||
import io.anuke.mindustry.input.InputHandler;
|
||||
@ -35,18 +36,30 @@ public class OverlayRenderer{
|
||||
|
||||
public void drawTop(){
|
||||
|
||||
for(Player player : playerGroup.all()){
|
||||
if(Core.settings.getBool("indicators") && player != players[0] && player.getTeam() == players[0].getTeam()){
|
||||
if(!rect.setSize(Core.camera.width * 0.9f, Core.camera.height * 0.9f)
|
||||
.setCenter(Core.camera.position.x, Core.camera.position.y).contains(player.x, player.y)){
|
||||
if(Core.settings.getBool("indicators")){
|
||||
for(Player player : playerGroup.all()){
|
||||
if(player != players[0] && player.getTeam() == players[0].getTeam()){
|
||||
if(!rect.setSize(Core.camera.width * 0.9f, Core.camera.height * 0.9f)
|
||||
.setCenter(Core.camera.position.x, Core.camera.position.y).contains(player.x, player.y)){
|
||||
|
||||
Tmp.v1.set(player.x, player.y).sub(Core.camera.position.x, Core.camera.position.y).setLength(indicatorLength);
|
||||
Tmp.v1.set(player.x, player.y).sub(Core.camera.position.x, Core.camera.position.y).setLength(indicatorLength);
|
||||
|
||||
Lines.stroke(2f, player.getTeam().color);
|
||||
Lines.lineAngle(Core.camera.position.x + Tmp.v1.x, Core.camera.position.y + Tmp.v1.y, Tmp.v1.angle(), 4f);
|
||||
Draw.reset();
|
||||
Lines.stroke(2f, player.getTeam().color);
|
||||
Lines.lineAngle(Core.camera.position.x + Tmp.v1.x, Core.camera.position.y + Tmp.v1.y, Tmp.v1.angle(), 4f);
|
||||
Draw.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Units.allUnits(unit -> {
|
||||
if(unit != players[0] && unit.getTeam() != players[0].getTeam() && !rect.setSize(Core.camera.width * 0.9f, Core.camera.height * 0.9f).setCenter(Core.camera.position.x, Core.camera.position.y).contains(unit.x, unit.y)){
|
||||
Tmp.v1.set(unit.x, unit.y).sub(Core.camera.position.x, Core.camera.position.y).setLength(indicatorLength);
|
||||
|
||||
Lines.stroke(1f, unit.getTeam().color);
|
||||
Lines.lineAngle(Core.camera.position.x + Tmp.v1.x, Core.camera.position.y + Tmp.v1.y, Tmp.v1.angle(), 3f);
|
||||
Draw.reset();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
for(Player player : players){
|
||||
|
Loading…
Reference in New Issue
Block a user