Switched default mech to dart / Bugfixes
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user