mirror of
https://github.com/Anuken/Mindustry.git
synced 2024-09-20 21:08:42 +03:00
Added smooth camera option
This commit is contained in:
parent
47b06d0eac
commit
58d8e22b40
@ -673,6 +673,7 @@ setting.milliseconds = {0} milliseconds
|
||||
setting.fullscreen.name = Fullscreen
|
||||
setting.borderlesswindow.name = Borderless Window[lightgray] (restart may be required)
|
||||
setting.fps.name = Show FPS & Ping
|
||||
setting.smoothcamera.name = Smooth Camera
|
||||
setting.blockselectkeys.name = Show Block Select Keys
|
||||
setting.vsync.name = VSync
|
||||
setting.pixelate.name = Pixelate
|
||||
|
@ -63,6 +63,7 @@ public class Weathers implements ContentList{
|
||||
}
|
||||
};
|
||||
|
||||
//TODO should apply wet effect
|
||||
rain = new Weather("rain"){
|
||||
float yspeed = 5f, xspeed = 1.5f, padding = 16f, size = 40f, density = 1200f;
|
||||
TextureRegion[] splashes = new TextureRegion[12];
|
||||
@ -158,7 +159,7 @@ public class Weathers implements ContentList{
|
||||
sandstorm = new Weather("sandstorm"){
|
||||
TextureRegion region;
|
||||
float yspeed = 0.3f, xspeed = 6f, padding = 110f, size = 110f, invDensity = 800f;
|
||||
Vec2 force = new Vec2(0.35f, 0.01f);
|
||||
Vec2 force = new Vec2(0.4f, 0.01f);
|
||||
Color color = Color.valueOf("f7cba4");
|
||||
|
||||
@Override
|
||||
|
@ -179,6 +179,7 @@ public class DesktopInput extends InputHandler{
|
||||
ui.listfrag.toggle();
|
||||
}
|
||||
|
||||
//TODO awful UI state checking code
|
||||
if((player.dead() || state.isPaused()) && !ui.chatfrag.shown()){
|
||||
if(!(scene.getKeyboardFocus() instanceof TextField) && !scene.hasDialog()){
|
||||
//move camera around
|
||||
@ -191,7 +192,7 @@ public class DesktopInput extends InputHandler{
|
||||
}
|
||||
}
|
||||
}else if(!player.dead()){
|
||||
Core.camera.position.lerpDelta(player, 0.08f);
|
||||
Core.camera.position.lerpDelta(player, Core.settings.getBool("smoothcamera") ? 0.08f : 1f);
|
||||
}
|
||||
|
||||
shouldShoot = true;
|
||||
|
@ -326,6 +326,7 @@ public class SettingsMenuDialog extends SettingsDialog{
|
||||
graphics.checkPref("blockstatus", false);
|
||||
graphics.checkPref("playerchat", true);
|
||||
graphics.checkPref("minimap", !mobile);
|
||||
graphics.checkPref("smoothcamera", true);
|
||||
graphics.checkPref("position", false);
|
||||
graphics.checkPref("fps", false);
|
||||
if(!mobile){
|
||||
@ -343,6 +344,8 @@ public class SettingsMenuDialog extends SettingsDialog{
|
||||
Core.settings.put("bloom", false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
graphics.checkPref("pixelate", false, val -> {
|
||||
if(val){
|
||||
Events.fire(Trigger.enablePixelation);
|
||||
|
Loading…
Reference in New Issue
Block a user