WaitForPath() public method

public WaitForPath ( ) : IEnumerator
return IEnumerator
 static int WaitForPath(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         Pathfinding.Path obj             = (Pathfinding.Path)ToLua.CheckObject <Pathfinding.Path>(L, 1);
         System.Collections.IEnumerator o = obj.WaitForPath();
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 2
0
 private IEnumerator WaitForPathCalculation()
 {
     Debug.Log ("mAttackingObject.transform.position = " + mAttackingObject.transform.position);
     mAStarPath = mSeeker.StartPath(transform.position, mAttackingObject.transform.position, OnPathComplete);
     yield return StartCoroutine (mAStarPath.WaitForPath ());
     //float temppathlength = 0.0f;
     mNearestTargetPathLength = mAStarPath.GetTotalLength ();
     Debug.Log ("mNearestTargetPathLength = " + mNearestTargetPathLength);
     //mAStarPath.Claim (this);
 }