public void Load(BoostCollectionSave save) { save.Guard(); Boosts.Clear(); foreach (var kvp in save.boosts) { BoostInfo boost = new BoostInfo(kvp.Value); Add(boost); } }
public void Guard() { if (profitBoosts == null) { profitBoosts = new BoostCollectionSave(); } if (timeBoosts == null) { timeBoosts = new BoostCollectionSave(); } }
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(); } }