CompleteOffMeshLink() private method

private CompleteOffMeshLink ( ) : void
return void
Beispiel #1
0
 static public int CompleteOffMeshLink(IntPtr l)
 {
     try {
         UnityEngine.NavMeshAgent self = (UnityEngine.NavMeshAgent)checkSelf(l);
         self.CompleteOffMeshLink();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Beispiel #2
0
 static public int CompleteOffMeshLink(IntPtr l)
 {
     try {
         UnityEngine.NavMeshAgent self = (UnityEngine.NavMeshAgent)checkSelf(l);
         self.CompleteOffMeshLink();
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
Beispiel #3
0
 static int CompleteOffMeshLink(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UnityEngine.NavMeshAgent obj = (UnityEngine.NavMeshAgent)ToLua.CheckObject(L, 1, typeof(UnityEngine.NavMeshAgent));
         obj.CompleteOffMeshLink();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #4
0
    public void AnimateNavMesh(NavMeshAgent nmAgent)
    {
        if (nmAgent.isOnOffMeshLink && !isJumping)
        {
            isJumping = true;
        }
        else
        {
            nmAgent.CompleteOffMeshLink();
            nmAgent.Resume();
            isJumping = false;
        }

        if (Vector3.Distance(transform.position, nmAgent.destination) > 0.5f)
        {
            Animate(0.0f, 0.5f);
            reset = true;
        }
        else if (reset)
        {
            Animate(0.0f, 0.0f);
            reset = false;
        }
    }