mirror of
https://github.com/yawaflua/Informatis.git
synced 2025-12-10 03:59:26 +02:00
added spawnpoint arrow
This commit is contained in:
@@ -72,6 +72,8 @@ setting.deadTarget.name = save locked target even if it's dead
|
||||
setting.deadTarget.description = continue to display the coordinates and target information when a fixed target dies.
|
||||
setting.distanceLine.name = Display distance line from info target
|
||||
setting.distanceLine.description = display dotted lines and numbers how far away the target is.
|
||||
setting.spawnerarrow.name = Display arrow pointing to wave spawn-points.
|
||||
setting.spawnerarrow.description =
|
||||
|
||||
setting.autoShooting.name = Enable Auto Shooting
|
||||
setting.autoShooting.description = no don't do hack
|
||||
|
||||
@@ -71,6 +71,8 @@ setting.deadTarget.name = 고정 목표물이 죽더라도 계속 고정하기
|
||||
setting.deadTarget.description = 고정 목표물이 죽어도 그 좌표와 대상 정보를 계속 표시합니다.
|
||||
setting.distanceLine.name = 목표물과의 거리선 표시
|
||||
setting.distanceLine.description = 목표물과 어느정도나 멀어졌는지 점선과 숫자로 표시합니다.
|
||||
setting.spawnerarrow.name = 적 단계 생성지점을 가르키는 화살표를 표시합니다.
|
||||
setting.spawnerarrow.description =
|
||||
|
||||
setting.autoShooting.name = 자동 사격 활성화
|
||||
setting.autoShooting.description =
|
||||
|
||||
@@ -60,6 +60,9 @@ public class OverDrawer {
|
||||
|
||||
public static void setEvent(){
|
||||
Events.run(EventType.Trigger.draw, () -> {
|
||||
float sin = Mathf.absin(Time.time, 6f, 1f);
|
||||
Draw.z(Layer.overlayUI + 1);
|
||||
|
||||
int[] units = {0};
|
||||
if(pathLine || unitLine || logicLine) Groups.unit.each(u -> {
|
||||
UnitController c = u.controller();
|
||||
@@ -93,7 +96,6 @@ public class OverDrawer {
|
||||
if(i + 1 >= pathTiles.size) continue; //prevent IndexOutException
|
||||
Tile tile1 = pathTiles.get(i);
|
||||
Tile tile2 = pathTiles.get(i + 1);
|
||||
Draw.z(Layer.overlayUI);
|
||||
Lines.stroke(1, u.team.color);
|
||||
Lines.line(tile1.worldx(), tile1.worldy(), tile2.worldx(), tile2.worldy());
|
||||
}
|
||||
@@ -111,7 +113,6 @@ public class OverDrawer {
|
||||
if(i + 1 >= pathTiles.size) continue; //prevent IndexOutException
|
||||
Tile tile1 = pathTiles.get(i);
|
||||
Tile tile2 = pathTiles.get(i + 1);
|
||||
Draw.z(Layer.overlayUI);
|
||||
Lines.stroke(1, enemyTeam.color);
|
||||
Lines.line(tile1.worldx(), tile1.worldy(), tile2.worldx(), tile2.worldy());
|
||||
}
|
||||
@@ -119,6 +120,11 @@ public class OverDrawer {
|
||||
}
|
||||
});
|
||||
|
||||
if(settings.getBool("spawnerarrow")) spawner.getSpawns().each(t -> {
|
||||
Drawf.circles(camera.position.x, camera.position.y, (player.unit() != null && player.unit().hitSize > 4 * 8f ? player.unit().hitSize * 1.5f : 4 * 8f) + sin - 4f);
|
||||
Drawf.arrow(camera.position.x, camera.position.y, t.x * 8f, t.y * 8f, (player.unit() != null && player.unit().hitSize > 4 * 8f ? player.unit().hitSize * 1.5f : 4 * 8f) + sin, (Math.min(200 * 8f, Mathf.dst(camera.position.x, camera.position.y, t.x * 8f, t.y * 8f)) / (200 * 8f)) * (5f + sin));
|
||||
});
|
||||
|
||||
if(settings.getBool("blockstatus")) Groups.build.each(build -> {
|
||||
if(Vars.player != null && Vars.player.team() == build.team) return;
|
||||
|
||||
@@ -128,7 +134,6 @@ public class OverDrawer {
|
||||
float brcx = build.x + (block.size * tilesize / 2f) - (tilesize * multiplier / 2f);
|
||||
float brcy = build.y - (block.size * tilesize / 2f) + (tilesize * multiplier / 2f);
|
||||
|
||||
Draw.z(Layer.power + 1);
|
||||
Draw.color(Pal.gray);
|
||||
Fill.square(brcx, brcy, 2.5f * multiplier, 45);
|
||||
Draw.color(build.status().color);
|
||||
@@ -234,29 +239,29 @@ public class OverDrawer {
|
||||
for(int i = 0; i < 4; i++){
|
||||
float rot = i * 90f + 45f + (-Time.time) % 360f;
|
||||
float length = (entity instanceof Unit ? ((Unit)entity).hitSize : entity instanceof Building ? ((Building)entity).block.size * tilesize : 0) * 1.5f + 2.5f;
|
||||
Draw.color(Tmp.c1.set(hud.locked ? Color.orange : Color.darkGray).lerp(hud.locked ? Color.scarlet : Color.gray, Mathf.absin(Time.time, 2f, 1f)).a(settings.getInt("selectopacity") / 100f));
|
||||
Draw.color(Tmp.c1.set(hud.locked ? Color.orange : Color.darkGray).lerp(hud.locked ? Color.scarlet : Color.gray, Mathf.absin(Time.time, 3f, 1f)).a(settings.getInt("selectopacity") / 100f));
|
||||
Draw.rect("select-arrow", entity.x() + Angles.trnsx(rot, length), entity.y() + Angles.trnsy(rot, length), length / 1.9f, length / 1.9f, rot - 135f);
|
||||
}
|
||||
if(settings.getBool("distanceLine") && player.unit() != null && !player.unit().dead && getTarget() != player.unit()) { //need selected other unit with living player
|
||||
Teamc from = player.unit();
|
||||
Teamc to = getTarget();
|
||||
float sin = Mathf.absin(Time.time, 6f, 1f);
|
||||
if(player.unit() instanceof BlockUnitUnit bu) Tmp.v1.set(bu.x() + bu.tile().block.offset, bu.y() + bu.tile().block.offset).sub(to.x(), to.y()).limit(bu.tile().block.size * tilesize + sin + 0.5f);
|
||||
else Tmp.v1.set(from.x(), from.y()).sub(to.x(), to.y()).limit(player.unit().hitSize + sin + 0.5f);
|
||||
|
||||
float x2 = from.x() - Tmp.v1.x, y2 = from.y() - Tmp.v1.y,
|
||||
x1 = to.x() + Tmp.v1.x, y1 = to.y() + Tmp.v1.y;
|
||||
int segs = (int) (to.dst(from.x(), from.y()) / tilesize);
|
||||
if(segs > 0){
|
||||
Lines.stroke(2.5f, Pal.gray);
|
||||
Lines.dashLine(x1, y1, x2, y2, segs);
|
||||
Lines.stroke(1f, Pal.placing);
|
||||
Lines.dashLine(x1, y1, x2, y2, segs);
|
||||
|
||||
Lines.stroke(2.5f, Pal.gray);
|
||||
Lines.dashLine(x1, y1, x2, y2, segs);
|
||||
Lines.stroke(1f, Pal.placing);
|
||||
Lines.dashLine(x1, y1, x2, y2, segs);
|
||||
|
||||
Fonts.outline.draw(Strings.fixed(to.dst(from.x(), from.y()), 2) + " (" + segs + "tiles)",
|
||||
from.x() + Angles.trnsx(Angles.angle(from.x(), from.y(), to.x(), to.y()), player.unit().hitSize() + 40),
|
||||
from.y() + Angles.trnsy(Angles.angle(from.x(), from.y(), to.x(), to.y()), player.unit().hitSize() + 40) - 3,
|
||||
Pal.accent, 0.25f, false, Align.center);
|
||||
Fonts.outline.draw(Strings.fixed(to.dst(from.x(), from.y()), 2) + " (" + segs + "tiles)",
|
||||
from.x() + Angles.trnsx(Angles.angle(from.x(), from.y(), to.x(), to.y()), player.unit().hitSize() + 40),
|
||||
from.y() + Angles.trnsy(Angles.angle(from.x(), from.y(), to.x(), to.y()), player.unit().hitSize() + 40) - 3,
|
||||
Pal.accent, 0.25f, false, Align.center);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -328,6 +333,7 @@ public class OverDrawer {
|
||||
}
|
||||
|
||||
public static void drawMassPayloadLink(PayloadMassDriver.PayloadDriverBuild from){
|
||||
float sin = Mathf.absin(Time.time, 6f, 1f);
|
||||
Groups.build.each(b -> b instanceof PayloadMassDriver.PayloadDriverBuild fromMass &&
|
||||
world.build(fromMass.link) == from &&
|
||||
from.within(fromMass.x, fromMass.y, ((PayloadMassDriver)fromMass.block).range) &&
|
||||
@@ -338,7 +344,6 @@ public class OverDrawer {
|
||||
|
||||
if(world.build(from.link) instanceof PayloadMassDriver.PayloadDriverBuild to && from != to &&
|
||||
to.within(from.x, from.y, ((PayloadMassDriver)from.block).range)){
|
||||
float sin = Mathf.absin(Time.time, 6f, 1f);
|
||||
Tmp.v1.set(from.x + from.block.offset, from.y + from.block.offset).sub(to.x, to.y).limit(from.block.size * tilesize + sin + 0.5f);
|
||||
float x2 = from.x - Tmp.v1.x, y2 = from.y - Tmp.v1.y,
|
||||
x1 = to.x + Tmp.v1.x, y1 = to.y + Tmp.v1.y;
|
||||
@@ -369,6 +374,7 @@ public class OverDrawer {
|
||||
}
|
||||
|
||||
public static void drawMassLink(MassDriver.MassDriverBuild from){
|
||||
float sin = Mathf.absin(Time.time, 6f, 1f);
|
||||
Groups.build.each(b -> b instanceof MassDriver.MassDriverBuild fromMass &&
|
||||
world.build(fromMass.link) == from &&
|
||||
from.within(fromMass.x, fromMass.y, ((MassDriver)fromMass.block).range) &&
|
||||
@@ -378,7 +384,6 @@ public class OverDrawer {
|
||||
});
|
||||
|
||||
if(world.build(from.link) instanceof MassDriver.MassDriverBuild to && from != to && to.within(from.x, from.y, ((MassDriver)from.block).range)){
|
||||
float sin = Mathf.absin(Time.time, 6f, 1f);
|
||||
Tmp.v1.set(from.x + from.block.offset, from.y + from.block.offset).sub(to.x, to.y).limit(from.block.size * tilesize + sin + 0.5f);
|
||||
float x2 = from.x - Tmp.v1.x, y2 = from.y - Tmp.v1.y,
|
||||
x1 = to.x + Tmp.v1.x, y1 = to.y + Tmp.v1.y;
|
||||
|
||||
@@ -137,6 +137,7 @@ public class SettingS {
|
||||
addGraphicCheckSetting("select", true, drawSeq);
|
||||
addGraphicCheckSetting("deadTarget", false, drawSeq);
|
||||
addGraphicCheckSetting("distanceLine", true, drawSeq);
|
||||
addGraphicCheckSetting("spawnerarrow", true, drawSeq);
|
||||
|
||||
Seq<SharSetting> etcSeq = new Seq<>();
|
||||
addGraphicCheckSetting("autoShooting", false, etcSeq);
|
||||
|
||||
Reference in New Issue
Block a user