Add camera lower bound
This commit is contained in:
@@ -71,7 +71,7 @@ public class PlayerMovement : MonoBehaviour
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (GameManager.Instance.gameOver) maxSpeed = 0.1f;
|
||||
if (GameManager.Instance.gameOver) maxSpeed = 1f;
|
||||
if (damageable.dying/* || (GameManager.Instance != null && GameManager.Instance.gameOver)*/) return;
|
||||
|
||||
Jump();
|
||||
@@ -99,7 +99,7 @@ public class PlayerMovement : MonoBehaviour
|
||||
animationPlayer.SetState(AnimationPlayer.AnimationState.Jump);
|
||||
else
|
||||
{
|
||||
if (Mathf.Abs(body.linearVelocityX) >= 0.5f)
|
||||
if (Mathf.Abs(body.linearVelocityX) >= 0.05f)
|
||||
animationPlayer.SetState(GameManager.Instance.gameOver ? AnimationPlayer.AnimationState.Walk : AnimationPlayer.AnimationState.Run);
|
||||
else
|
||||
animationPlayer.SetState(AnimationPlayer.AnimationState.Idle);
|
||||
|
||||
Reference in New Issue
Block a user