void Update() { if (Input.GetMouseButtonDown(Constants.RightMouseButton)) { Move(this); } if (AiPath.remainingDistance < 2f && UnitState != Constants.UnitState.Idle) { UnitAnimator.Idle(Animator); UnitState = Constants.UnitState.Idle; Debug.Log("Stop"); } if (AiPath.remainingDistance >= 2f && UnitState != Constants.UnitState.Moving) { UnitAnimator.Move(Animator); UnitState = Constants.UnitState.Moving; Debug.Log("Moving"); } }