Projector visualization

This commit is contained in:
Anuken
2020-04-28 13:15:40 -04:00
parent 2504fd536b
commit 3ccf2ecc24
5 changed files with 13 additions and 2 deletions

View File

@@ -24,7 +24,6 @@ public class UnitTypes implements ContentList{
public static UnitType alpha, delta, tau, omega, dart, javelin, trident, glaive;
public static UnitType starter;
@Override
public void load(){

View File

@@ -46,6 +46,14 @@ public class Drawf{
renderer.lights.line(x, y, x2, y2, stroke, tint, alpha);
}
public static void selected(Tilec tile, Color color){
selected(tile.tile(), color);
}
public static void selected(Tile tile, Color color){
selected(tile.x, tile.y, tile.block(), color);
}
public static void selected(int x, int y, Block block, Color color){
Draw.color(color);
for(int i = 0; i < 4; i++){

View File

@@ -95,6 +95,8 @@ public class MendProjector extends Block{
public void drawSelect(){
float realRange = range + phaseHeat * phaseRangeBoost;
indexer.eachBlock(this, realRange, other -> true, other -> Drawf.selected(other, Tmp.c1.set(baseColor).a(Mathf.absin(4f, 1f))));
Drawf.dashCircle(x, y, realRange, baseColor);
}

View File

@@ -99,6 +99,8 @@ public class OverdriveProjector extends Block{
public void drawSelect(){
float realRange = range + phaseHeat * phaseRangeBoost;
indexer.eachBlock(this, realRange, other -> true, other -> Drawf.selected(other, Tmp.c1.set(baseColor).a(Mathf.absin(4f, 1f))));
Drawf.dashCircle(x, y, realRange, baseColor);
}