Ejemplo n.º 1
0
        /// <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);
        }
Ejemplo n.º 2
0
 /// <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);
 }