Enemy indicators
This commit is contained in:
@@ -404,7 +404,7 @@ category.crafting = Input/Output
|
|||||||
category.shooting = Shooting
|
category.shooting = Shooting
|
||||||
category.optional = Optional Enhancements
|
category.optional = Optional Enhancements
|
||||||
setting.animatedwater.name = Animated Water
|
setting.animatedwater.name = Animated Water
|
||||||
setting.indicators.name = Ally Indicators
|
setting.indicators.name = Enemy/Ally Indicators
|
||||||
setting.autotarget.name = Auto-Target
|
setting.autotarget.name = Auto-Target
|
||||||
setting.fpscap.name = Max FPS
|
setting.fpscap.name = Max FPS
|
||||||
setting.fpscap.none = None
|
setting.fpscap.none = None
|
||||||
@@ -517,8 +517,8 @@ liquid.oil.name = Oil
|
|||||||
liquid.cryofluid.name = Cryofluid
|
liquid.cryofluid.name = Cryofluid
|
||||||
mech.alpha-mech.name = Alpha
|
mech.alpha-mech.name = Alpha
|
||||||
mech.alpha-mech.weapon = Heavy Repeater
|
mech.alpha-mech.weapon = Heavy Repeater
|
||||||
mech.alpha-mech.ability = Drone Swarm
|
mech.alpha-mech.ability = None
|
||||||
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.description = The standard mech. Has decent speed and damage output.
|
||||||
mech.delta-mech.name = Delta
|
mech.delta-mech.name = Delta
|
||||||
mech.delta-mech.weapon = Arc Generator
|
mech.delta-mech.weapon = Arc Generator
|
||||||
mech.delta-mech.ability = Discharge
|
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.Time;
|
||||||
import io.anuke.arc.util.Tmp;
|
import io.anuke.arc.util.Tmp;
|
||||||
import io.anuke.mindustry.content.Blocks;
|
import io.anuke.mindustry.content.Blocks;
|
||||||
|
import io.anuke.mindustry.entities.Units;
|
||||||
import io.anuke.mindustry.entities.type.Player;
|
import io.anuke.mindustry.entities.type.Player;
|
||||||
import io.anuke.mindustry.game.Team;
|
import io.anuke.mindustry.game.Team;
|
||||||
import io.anuke.mindustry.input.InputHandler;
|
import io.anuke.mindustry.input.InputHandler;
|
||||||
@@ -35,18 +36,30 @@ public class OverlayRenderer{
|
|||||||
|
|
||||||
public void drawTop(){
|
public void drawTop(){
|
||||||
|
|
||||||
for(Player player : playerGroup.all()){
|
if(Core.settings.getBool("indicators")){
|
||||||
if(Core.settings.getBool("indicators") && player != players[0] && player.getTeam() == players[0].getTeam()){
|
for(Player player : playerGroup.all()){
|
||||||
if(!rect.setSize(Core.camera.width * 0.9f, Core.camera.height * 0.9f)
|
if(player != players[0] && player.getTeam() == players[0].getTeam()){
|
||||||
.setCenter(Core.camera.position.x, Core.camera.position.y).contains(player.x, player.y)){
|
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.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);
|
Lines.lineAngle(Core.camera.position.x + Tmp.v1.x, Core.camera.position.y + Tmp.v1.y, Tmp.v1.angle(), 4f);
|
||||||
Draw.reset();
|
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){
|
for(Player player : players){
|
||||||
|
|||||||
Reference in New Issue
Block a user