Less messy respawning / Standard starter mech / Bugfixes
This commit is contained in:
@@ -22,6 +22,7 @@ public enum Binding implements KeyBind{
|
||||
zoom(new Axis(KeyCode.SCROLL)),
|
||||
menu(Core.app.getType() == ApplicationType.Android ? KeyCode.BACK : KeyCode.ESCAPE),
|
||||
pause(KeyCode.SPACE),
|
||||
minimap(KeyCode.M),
|
||||
toggle_menus(KeyCode.C),
|
||||
screenshot(KeyCode.P),
|
||||
player_list(KeyCode.TAB, "multiplayer"),
|
||||
|
||||
@@ -130,6 +130,14 @@ public class DesktopInput extends InputHandler{
|
||||
player.isShooting = false;
|
||||
}
|
||||
|
||||
if(!state.is(State.menu) && Core.input.keyTap(Binding.minimap)){
|
||||
if(!ui.minimap.isShown()){
|
||||
ui.minimap.show();
|
||||
}else{
|
||||
ui.minimap.hide();
|
||||
}
|
||||
}
|
||||
|
||||
if(state.is(State.menu) || Core.scene.hasDialog()) return;
|
||||
|
||||
//zoom and rotate things
|
||||
|
||||
@@ -734,9 +734,11 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
if(player.isDead()) return;
|
||||
|
||||
Vector2 v = Core.camera.position;
|
||||
//change to 1/2 to clamp to viewport
|
||||
float scaling = 1f;
|
||||
|
||||
v.x = clerp(v.x, player.x - Core.camera.width/2f, player.x + Core.camera.width/2f);
|
||||
v.y = clerp(v.y, player.y - Core.camera.height/2f, player.y + Core.camera.height/2f);
|
||||
v.x = clerp(v.x, player.x - Core.camera.width*scaling, player.x + Core.camera.width*scaling);
|
||||
v.y = clerp(v.y, player.y - Core.camera.height*scaling, player.y + Core.camera.height*scaling);
|
||||
}
|
||||
|
||||
float clerp(float value, float min, float max){
|
||||
|
||||
Reference in New Issue
Block a user