public void LoadFields(SaveData loadData) { goldCount.text = loadData.goldAmount.ToString(); pearlScript.pearlCount = loadData.pearlAmount; timeManagerScript.playTime = loadData.playTime; shopControllerScript.oxygenPrice = loadData.airUpgradePrice; shopControllerScript.speedPrice = loadData.speedUpgradePrice; airBarScript.airDepletionSpeed = loadData.upgradesStages["Air"]; playerController.speed = loadData.upgradesStages["Speed"]; if ((int)loadData.upgradesStages["Speed"] == 1) { shopControllerScript.BuyFlashlight(); } shopControllerScript.RefreshText(); }