|
|
|
|
|
|
public void Dispose() |
|
|
|
{ |
|
|
|
Academy.Instance.PostAgentAct -= _ManagerStep; |
|
|
|
foreach (var agent in m_Agents) |
|
|
|
while (m_Agents.Count > 0) |
|
|
|
agent.UnregisterFromTeamManager -= UnregisterAgent; |
|
|
|
UnregisterAgent(m_Agents[0]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
if (!m_Agents.Contains(agent)) |
|
|
|
{ |
|
|
|
agent.SetTeamManager(this); |
|
|
|
agent.SetTeamManager(this); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|