public int AddAgent(DetourAgent agent, CrowdAgentParams ap) { Assert.IsTrue(_crowd.Handle.ToInt64() != 0); int idx = addAgent(_crowd.Handle, agent.transform.position.ToFloat(), ref ap); if (idx != -1) { agents.Add(agent); } return(idx); }
public static extern void updateAgent(IntPtr crowd, int idx, ref CrowdAgentParams ap);
public void UpdateAgentParemeters(int idx, CrowdAgentParams ap) { Assert.IsTrue(_crowd.Handle.ToInt64() != 0); updateAgent(_crowd.Handle, idx, ref ap); }
public static extern int addAgent(IntPtr crowd, float[] p, ref CrowdAgentParams ap);
public int AddAgent(DetourAgent agent, CrowdAgentParams ap) { Assert.IsTrue(_crowd.Handle.ToInt64() != 0); int idx = addAgent(_crowd.Handle, agent.transform.position.ToFloat(), ref ap); if (idx != -1) { agents.Add(agent); } return idx; }