This commit is contained in:
Anuken
2023-06-06 10:05:11 -04:00
parent fc673de556
commit 84817c0c24
2 changed files with 17 additions and 15 deletions

View File

@ -209,6 +209,8 @@ public class Renderer implements ApplicationListener{
landTime = 0f;
graphics.clear(Color.black);
}else{
minimap.update();
if(shakeTime > 0){
float intensity = shakeIntensity * (settings.getInt("screenshake", 4) / 4f) * 0.75f;
camShakeOffset.setToRandomDirection().scl(Mathf.random(intensity));

View File

@ -68,8 +68,9 @@ public class MinimapRenderer{
});
Events.on(BuildTeamChangeEvent.class, event -> update(event.build.tile));
}
Events.run(Trigger.update, () -> {
public void update(){
//updates are batched to occur every 2 frames
if((updateCounter += Time.delta) >= updateInterval){
updateCounter %= updateInterval;
@ -87,7 +88,6 @@ public class MinimapRenderer{
updates.clear();
}
});
}
public Pixmap getPixmap(){