Beispiel #1
0
 internal static void Unload()
 {
     if (stats == null)
     {
         return;
     }
     DefaultStats.Unload();
     OnStatsUnloaded?.Invoke(new StatsUnloadedEventArgs()
     {
     });
     stats = null;
 }
Beispiel #2
0
        internal static void SetFromSaveData(Dictionary <string, SaveManager.SaveDataStat> dataStats)
        {
            Dictionary <string, Stat> newStats = new Dictionary <string, Stat>();

            foreach (KeyValuePair <string, SaveManager.SaveDataStat> keyValuePair in dataStats)
            {
                Stat saveStat = new Stat(keyValuePair.Value);
                newStats.Add(keyValuePair.Key, saveStat);
            }
            stats = newStats;
            DefaultStats.Load();
            OnStatsLoaded?.Invoke(new StatsLoadedEventArgs()
            {
            });
        }