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)); } }
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); } }
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)); } }
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; } }