/// <summary>
 /// Register score for the team.
 /// </summary>
 /// <param name="score"></param>
 public static async void RegisterScoreForTeam(ActiveTeamData team, int score)
 {
     var tScore = score / 100;
     if (tScore > 0)
      team.Score = await UIManager.QueueTeamInfoProgressBar(team, tScore);
 }
        /// <summary>
        /// Randomize active teams.
        /// </summary>
        public static void GetNewTeams()
        {
            var teamData = XMLHelper.ReadValues<TeamInfo>(@"scripts\AirSuperiority\assets.xml", "TeamInfo", "name", "imageAsset", "altAsset");

            for (int i = 0; i < Config.MaxTeams; i++)
            {
                var tCl = GetColorFromTeamIndex(i);

                var tInfo = teamData.Where(x => !_activeTeams.Any(y => y.TeamInfo.FriendlyName == x.FriendlyName)).GetRandomItem();

                var team = new ActiveTeamData(i, rGroups[i], tCl, tInfo, GroundSpawns[i], JetSpawns[i]);

                UIManager.UpdateTeamInfoFriendlyName(team);
                UIManager.UpdateTeamInfoFlagAsset(team);

                _activeTeams.Add(team);
            }
        }
Exemple #3
0
 /// <summary>
 /// Assign this ground asset a team.
 /// </summary>
 /// <param name="newTeam"></param>
 public void AssignTeam(ActiveTeamData newTeam)
 {
     team = newTeam;
 }