Esempio n. 1
0
 public static void ResetMatchStuff()
 {
     PurpleBlock.Reset();
     Highlights.ClearHighlights();
     Crowd.GoHome();
     GameMode.lastWinners.Clear();
     Deathmatch.levelsSinceRandom = 0;
     Deathmatch.levelsSinceCustom = 0;
     GameMode.numMatchesPlayed    = 0;
     GameMode.showdown            = false;
     RockWeather.Reset();
     Music.Reset();
     foreach (Team team in Teams.all)
     {
         team.prevScoreboardScore = team.score = 0;
         if (team.activeProfiles.Count > 0)
         {
             foreach (Profile activeProfile in team.activeProfiles)
             {
                 activeProfile.stats.lastPlayed = activeProfile.stats.lastPlayed = DateTime.Now;
                 activeProfile.RecordPreviousStats();
                 Profiles.Save(activeProfile);
             }
         }
     }
     if (Profiles.all != null)
     {
         foreach (Profile profile in Profiles.all)
         {
             profile?.RecordPreviousStats();
         }
     }
     Global.Save();
     Options.Save();
     Crowd.InitializeCrowd();
 }