/// <summary> /// Assign the ground asset to the specified team /// </summary> /// <param name="newAsset">Target ground asset.</param> /// <param name="team">Team index.</param> public static void SetupTeam(AIConvoy newAsset) { var memberCounts = _activeTeams.Select(x => x.ActiveGroundAssets.Count).ToList(); var team = _activeTeams[memberCounts.IndexOf(memberCounts.Min())]; newAsset.Leader.AssignTeam(team); team.ActiveGroundAssets.Add(newAsset); }
/// <summary> /// Assign the ground asset to the specified team /// </summary> /// <param name="newAsset">Target ground asset.</param> /// <param name="team">Team index.</param> public static void SetupTeam(AIConvoy newAsset, int team) { newAsset.Leader.AssignTeam(_activeTeams[team]); _activeTeams[team].ActiveGroundAssets.Add(newAsset); }