// Start is called before the first frame update private void Start() { myFile.Delete(); if (myFile.FileExists()) { if (myFile.Load()) { LoadInventory(); LoadEquipment(); LoadShop(); // Gold gold.ChangeGold(myFile.GetInt("gold", defaultValue: 5000)); // Encounter gameManager.nextEncounterNumber = myFile.GetInt("encounter", defaultValue: 1); } else { MessageSystem.Print("Load Failed!"); } } else { gold.ChangeGold(5000); shop.GenerateItems(); SaveInventory(); } myFile.Dispose(); }