private void WalkAndRun(float moveInput) { if (moveInput != 0f) { //animator.SetFloat("Speed", moveInput); unitAnimator.WalkAnima(moveInput); if (moveInput > 0.5f) { velocity += transform.forward * moveInput * runSpeed; } else { velocity += transform.forward * moveInput * walkSpeed; } } else { //animator.SetFloat("Speed", 0f); unitAnimator.StopWalkAnima(); } }