private void DispatchTask() { foreach (var item in m_TaskTable) { behaviac.Agent agent = null; if (m_AgentTable.TryGetValue(item.Key, out agent)) { agent.FireEvent(item.Value.Name, item.Value.EventType); } } m_TaskTable.Clear(); }