Switched default mech to dart / Bugfixes

This commit is contained in:
Anuken
2019-05-03 09:21:45 -04:00
parent 0c396f76b2
commit a161c09441
5 changed files with 3 additions and 16 deletions
@@ -590,7 +590,6 @@ public class MobileInput extends InputHandler implements GestureListener{
@Override
public void update(){
clampCamera();
if(state.is(State.menu) || player.isDead()){
selection.clear();
removals.clear();
@@ -730,17 +729,6 @@ public class MobileInput extends InputHandler implements GestureListener{
return true;
}
void clampCamera(){
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*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){
final float alpha = 0.07f;
return value < min ? Mathf.lerpDelta(value, min, alpha) : value > max ? Mathf.lerpDelta(value, max, alpha) : value;