コード例 #1
0
 void DoMinor()
 {
     if (target != null)
     {
         float distSq = (this.transform.position - target.position).sqrMagnitude;
         if (distSq < 3f * 3f)
         {
             aiDesiredSpeed = 0.1f;
             agent.SetDestination(target.position);
             actor.AIThrow(true);
         }
         else
         {
             aiDesiredSpeed = 1f;
             agent.SetDestination(target.position);
             actor.AIThrow(false);
         }
     }
     else
     {
         aiDesiredSpeed = 0.25f;
         agent.SetDestination(Vector3.up * 1f);
     }
 }