Disabled spawner radius/warning when waves off

This commit is contained in:
Anuken
2020-10-16 11:27:17 -04:00
parent 2f54edf34f
commit f5decdaa1c
4 changed files with 23 additions and 6 deletions

View File

@@ -121,10 +121,12 @@ public class OverlayRenderer{
Lines.stroke(2f);
Draw.color(Color.gray, Color.lightGray, Mathf.absin(Time.time(), 8f, 1f));
for(Tile tile : spawner.getSpawns()){
if(tile.within(player.x, player.y, state.rules.dropZoneRadius + spawnerMargin)){
Draw.alpha(Mathf.clamp(1f - (player.dst(tile) - state.rules.dropZoneRadius) / spawnerMargin));
Lines.dashCircle(tile.worldx(), tile.worldy(), state.rules.dropZoneRadius);
if(state.rules.waves){
for(Tile tile : spawner.getSpawns()){
if(tile.within(player.x, player.y, state.rules.dropZoneRadius + spawnerMargin)){
Draw.alpha(Mathf.clamp(1f - (player.dst(tile) - state.rules.dropZoneRadius) / spawnerMargin));
Lines.dashCircle(tile.worldx(), tile.worldy(), state.rules.dropZoneRadius);
}
}
}