void OnTriggerExit(Collider other) { C_FlockGoal goal = other.GetComponent <C_FlockGoal> (); if (goal != null) { Goals.Remove(goal); } }
void OnTriggerEnter(Collider collider) { C_FlockGoal goal = collider.GetComponent <C_FlockGoal> (); if (goal != null) { Goals.Add(goal); goal.OnGoalDestroyed += OnGoalDestroyed; } }
void OnGoalDestroyed(C_FlockGoal goal) { Goals.Remove(goal); }
void GoalDestroyed(C_FlockGoal goal) { }