/// <summary> /// Removes Agent from tracked <see cref="m_CurrentAgentsInside"/> /// </summary> void OnAgentRemoved(DamageableBehaviour targetable) { targetable.removed -= OnAgentRemoved; AgentYfb attackingAgent = targetable as AgentYfb; RemoveTarget(attackingAgent); }
/// <summary> /// Removes <paramref name="agent"/> from <see cref="m_CurrentAgentsInside"/> and stops pfx /// if there are no more <see cref="Agent"/>s /// </summary> /// <param name="agent"> /// The agent to remove /// </param> void RemoveTarget(AgentYfb agent) { if (agent == null) { return; } m_CurrentAgentsInside.Remove(agent); //if (m_CurrentAgentsInside.Count == 0 && chargePfx != null) //{ // chargePfx.Stop(); //} }