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); }
public void RemoveAgent(FlowFieldAgent agent) { _agents.Remove(agent); agent._group = null; }
public void AddAgent(FlowFieldAgent agent) { _agents.Add(agent); agent._group = this; }