Added camera movement while paused
This commit is contained in:
@@ -123,12 +123,14 @@ public class Renderer implements ApplicationListener{
|
||||
|
||||
if(player.isDead()){
|
||||
TileEntity core = player.getClosestCore();
|
||||
if(core != null && player.spawner == null){
|
||||
camera.position.lerpDelta(core.x, core.y, 0.08f);
|
||||
}else if(core != null){
|
||||
camera.position.lerpDelta(position, 0.08f);
|
||||
if(core != null){
|
||||
if(player.spawner == null){
|
||||
camera.position.lerpDelta(core.x, core.y, 0.08f);
|
||||
}else{
|
||||
camera.position.lerpDelta(position, 0.08f);
|
||||
}
|
||||
}
|
||||
}else if(control.input instanceof DesktopInput){
|
||||
}else if(control.input instanceof DesktopInput && !state.isPaused()){
|
||||
camera.position.lerpDelta(position, 0.08f);
|
||||
}
|
||||
|
||||
|
||||
@@ -136,9 +136,9 @@ public class DesktopInput extends InputHandler{
|
||||
ui.listfrag.toggle();
|
||||
}
|
||||
|
||||
if(player.getClosestCore() == null && !ui.chatfrag.shown()){
|
||||
if((player.getClosestCore() == null || state.isPaused()) && !ui.chatfrag.shown()){
|
||||
//move camera around
|
||||
float camSpeed = 6f;
|
||||
float camSpeed = !Core.input.keyDown(Binding.dash) ? 3f : 8f;
|
||||
Core.camera.position.add(Tmp.v1.setZero().add(Core.input.axis(Binding.move_x), Core.input.axis(Binding.move_y)).nor().scl(Time.delta() * camSpeed));
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public class ScriptConsoleFragment extends Table{
|
||||
clearChatInput();
|
||||
}
|
||||
|
||||
return shown;
|
||||
return shown && Vars.net.active();
|
||||
});
|
||||
|
||||
update(() -> {
|
||||
|
||||
Reference in New Issue
Block a user