public PlayerData(int money, string playerName, List <scoreRecord> hs) { this.money = money; this.playerName = playerName; this.highscores = hs; this.PlayerUpgradeData = UpgradeCenter.GetPlayerUpgradeData(); }
public static void SetPlayerUpgradeData(PlayerUpgradeData pud) { if (pud.UpgradableProperties != null) { _upgradableProperties = pud.UpgradableProperties; } if (pud.EnablableProperties != null) { _enablableProperties = pud.EnablableProperties; } //check not null if (_upgradableProperties == null) { _upgradableProperties = new Dictionary <string, UpgradableNumber>(); } if (_enablableProperties == null) { _enablableProperties = new Dictionary <string, EnablableBoolean>(); } }