void Start() { TheAgent = this.GetComponent <NavMeshAgent> (); headingAim = this.transform.rotation; theAnimatorController = this.GetComponent <animatorController> (); theMoveController = this.GetComponent <CharacterController> (); theMoveModeNow = new runMoveMode(); }
/// <summary> /// 切换到指定的运动状态 /// </summary> /// <param name="newMode">New mode.</param> public void changeMoveMode(moveModeBasic newMode) { theMoveModeNow.OnEndMove(this); theMoveModeNow = newMode; theMoveModeNow.OnStartMove(this); }