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