Exemplo n.º 1
0
        public void RefreshAllPath()
        {
#if USING_FLOW_FIELD
            if (_flowManager != null)
            {
                _flowManager.UpdateFlowFields();
            }
#endif
            int taskCount  = _tasks.Count;
            int pathMcount = taskCount + 1;
            for (int k = 0; k < pathMcount; k++)
            {
                int aCount = _pathManagers[k]._agentIdx.Count;
                for (int j = 0; j < aCount; j++)
                {
                    if (_pathManagers[k]._agentIdx[j].AgentType == EAgentType.astar)
                    {
                        AStarAgent aa = _pathManagers[k]._agentIdx[j].agent as AStarAgent;
                        if (aa != null)
                        {
                            aa.ClearPath();
                        }
                    }
                }
                _pathManagers[k].Reset();
                _pathManagers[k].ClearPath();
            }
        }