Beispiel #1
0
        public void MoveTarget(DetourAgent agent, Vector3 target)
        {
            Assert.IsTrue(_crowd.Handle.ToInt64() != 0);
            Assert.IsTrue(_tileCache.NavQueryHandle.Handle.ToInt64() != 0);

            setMoveTarget(_tileCache.NavQueryHandle.Handle, _crowd.Handle, agent.ID, target.ToFloat(), false, agent.FilterIndex);
        }
Beispiel #2
0
        public void RemoveAgent(DetourAgent agent)
        {
            Assert.IsTrue(_crowd.Handle.ToInt64() != 0);

            removeAgent(_crowd.Handle, agent.ID);
            agents.Remove(agent);
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        public void MoveTarget(DetourAgent agent, Vector3 target)
        {
            Assert.IsTrue(_crowd.Handle.ToInt64() != 0);
            Assert.IsTrue(_tileCache.NavQueryHandle.Handle.ToInt64() != 0);

            setMoveTarget(_tileCache.NavQueryHandle.Handle, _crowd.Handle, agent.ID, target.ToFloat(), false, agent.FilterIndex);
        }
Beispiel #5
0
        public void RemoveAgent(DetourAgent agent)
        {
            Assert.IsTrue(_crowd.Handle.ToInt64() != 0);

            removeAgent(_crowd.Handle, agent.ID);
            agents.Remove(agent);
        }
Beispiel #6
0
        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;
        }