public void Load(BoostCollectionSave save)
 {
     save.Guard();
     Boosts.Clear();
     foreach (var kvp in save.boosts)
     {
         BoostInfo boost = new BoostInfo(kvp.Value);
         Add(boost);
     }
 }
Example #2
0
        public void Guard()
        {
            if (profitBoosts == null)
            {
                profitBoosts = new BoostCollectionSave();
            }

            if (timeBoosts == null)
            {
                timeBoosts = new BoostCollectionSave();
            }
        }
Example #3
0
 public void Guard()
 {
     if (generators == null)
     {
         generators = new List <GeneratorInfoSave>();
     }
     if (profitSave == null)
     {
         profitSave = new BoostCollectionSave();
         profitSave.Guard();
     }
     if (timeSave == null)
     {
         timeSave = new BoostCollectionSave();
         timeSave.Guard();
     }
 }