public void ClearGroupTarget() { if (Behaviours.ContainsKey(SteeringType.Alignment)) { Alignment Alignment = (Alignment)Behaviours[SteeringType.Alignment]; Alignment.Targets.Clear(); } if (Behaviours.ContainsKey(SteeringType.Cohesion)) { Cohesion Cohesion = (Cohesion)Behaviours[SteeringType.Cohesion]; Cohesion.Targets.Clear(); } if (Behaviours.ContainsKey(SteeringType.Separation)) { Separation Separation = (Separation)Behaviours[SteeringType.Separation]; Separation.Targets.Clear(); } }
public void SetGroupTarget(List <Unit> Targets) { if (Behaviours.ContainsKey(SteeringType.Alignment)) { Alignment Alignment = (Alignment)Behaviours[SteeringType.Alignment]; Alignment.Targets = Targets; } if (Behaviours.ContainsKey(SteeringType.Cohesion)) { Cohesion Cohesion = (Cohesion)Behaviours[SteeringType.Cohesion]; Cohesion.Targets = Targets; } if (Behaviours.ContainsKey(SteeringType.Separation)) { Separation Separation = (Separation)Behaviours[SteeringType.Separation]; Separation.Targets = Targets; } }