Refactoring / Launch pad tweaks

This commit is contained in:
Anuken
2020-05-14 22:00:04 -04:00
parent 3fd677b3e6
commit a4987f864f
31 changed files with 761 additions and 679 deletions

View File

@@ -90,7 +90,11 @@ public class Drawf{
}
public static void shadow(float x, float y, float rad){
Draw.color(0, 0, 0, 0.4f);
shadow(x, y, rad, 1f);
}
public static void shadow(float x, float y, float rad, float alpha){
Draw.color(0, 0, 0, 0.4f * alpha);
Draw.rect("circle-shadow", x, y, rad, rad);
Draw.color();
}

View File

@@ -71,7 +71,7 @@ public class LoadRenderer implements Disposable{
}
float timespace = Time.timeSinceMillis(lastFrameTime) / 1000f;
renderTimes.addValue(timespace);
renderTimes.add(timespace);
lastFrameTime = Time.millis();
}
@@ -278,8 +278,8 @@ public class LoadRenderer implements Disposable{
for(int i = 0; i < bars; i++){
int index = i % renderTimes.getWindowSize();
float val = renderTimes.getValue(index);
float scale = Mathf.clamp(!renderTimes.hasEnoughData() ? Mathf.randomSeed(i) : (val / renderTimes.getMean() - 0.5f));
float val = renderTimes.get(index);
float scale = Mathf.clamp(!renderTimes.hasEnoughData() ? Mathf.randomSeed(i) : (val / renderTimes.mean() - 0.5f));
Color dst = scale > 0.8f ? colorRed : color;
Draw.color(dst);