LAccess.speed / Merged #6293

This commit is contained in:
Anuken
2021-12-10 00:36:47 -05:00
parent 84c5bc9bdf
commit 761ee12e6f
8 changed files with 43 additions and 8 deletions

View File

@@ -113,6 +113,33 @@ public class MinimapRenderer{
}
}
Draw.reset();
if(withLabels){
drawSpawns(x, y, w, h, scaling);
}
}
public void drawSpawns(float x, float y, float w, float h, float scaling){
if(!state.rules.showSpawns || !state.hasSpawns() || !state.rules.waves) return;
TextureRegion icon = Icon.units.getRegion();
Lines.stroke(3f);
Draw.color(state.rules.waveTeam.color, Tmp.c2.set(state.rules.waveTeam.color).value(1.2f), Mathf.absin(Time.time, 16f, 1f));
for(Tile tile : spawner.getSpawns()){
float tx = ((tile.x + 0.5f) / world.width()) * w;
float ty = ((tile.y + 0.5f) / world.height()) * h;
float rad = (state.rules.dropZoneRadius / (baseSize / 2f)) * 5f * scaling;
float curve = Mathf.curve(Time.time % 240f, 120f, 240f);
Draw.rect(icon, x + tx, y + ty, icon.width, icon.height);
Lines.circle(x + tx, y + ty, rad);
if(curve > 0f) Lines.circle(x + tx, y + ty, rad * Interp.pow3Out.apply(curve));
}
Draw.reset();
}