void SetMovingState() { if (movementX == 0 && movementY == 0) { isWalking = false; isRunning = false; speedMultiplier = 1; playerAppearance.SetAnimationState("IsIdle"); } else if (Input.GetKey(KeyCode.LeftShift)) { isRunning = true; isWalking = false; speedMultiplier = runMultiplier; playerAppearance.SetAnimationState("IsRunning"); } else { isWalking = true; isRunning = false; speedMultiplier = 1; playerAppearance.SetAnimationState("IsWalking"); } }