Dictionary <int, FlowField> _dicFlowFields = new Dictionary <int, FlowField>(); //key:distination

        public FlowField GetFlowField(FlowFieldAgent agent)
        {
            FlowField ff;
            int       idx = agent._behaviour.map.GetGridNodeId(agent.TargetPos);

            if (!_dicFlowFields.TryGetValue(idx, out ff))
            {
            }
            return(ff);
        }
Esempio n. 2
0
 public void RemoveAgent(FlowFieldAgent agent)
 {
     _agents.Remove(agent);
     agent._group = null;
 }
Esempio n. 3
0
 public void AddAgent(FlowFieldAgent agent)
 {
     _agents.Add(agent);
     agent._group = this;
 }