Added weapon upgrades, bugfixes

This commit is contained in:
Anuken
2017-05-05 15:19:19 -04:00
parent be0276bb2a
commit c9019dd2eb
25 changed files with 470 additions and 133 deletions

View File

@@ -158,6 +158,7 @@ public class Renderer{
float offset = 7;
float fraction = Mathf.clamp((float) health / maxhealth);
float w = (len * 2 * fraction);
Draw.thickness(3f);
Draw.color(Color.GRAY);
@@ -166,7 +167,8 @@ public class Renderer{
Draw.color(Color.BLACK);
Draw.line(x - len + 1, y - offset, x + len, y - offset);
Draw.color(Color.RED);
Draw.line(x - len + 1, y - offset, x - len + (int)(len * 2 * fraction), y - offset);
if(w >= 1)
Draw.line(x - len + 1, y - offset, x - len + w, y - offset);
Draw.clear();
}
}