public static void Save() { BinaryFormatter data = new BinaryFormatter(); FileStream file = File.Create(Application.persistentDataPath + "/gameSave.dat"); SaveableData saveData = new SaveableData(); //-----------------------Saving Data--------------------------------------------- Hashtable dataToSave = new Hashtable(); dataToSave.Add("finishedTutorial", CampaignData.GetFinishedTutorial()); dataToSave.Add("viewedAbilityMatchInstructions", CampaignData.ViewedMatchAbilityInstructions()); dataToSave.Add("allBoardLevels", CampaignData.GetAllLevelsDictionary()); dataToSave.Add("heroesUnlocked", CampaignData.GetAllHeroBoardsDictionary()); dataToSave.Add("boardStarCounts", CampaignData.GetAllBoardStarCounts()); //-----------------------Done Saving--------------------------------------------- data.Serialize(file, dataToSave); file.Close(); //Debug.Log("Saved here: " + Application.persistentDataPath); }
void Start() { SaveLoad.Load(); if (CampaignData.ViewedMatchAbilityInstructions()) { gameObject.SetActive(false); } else { //Debug.Log("Viewed Instructions Already: " + CampaignData.ViewedMatchAbilityInstructions()); step1.SetActive(true); step2.SetActive(false); step3.SetActive(false); step4.SetActive(false); step5.SetActive(false); step6.SetActive(false); step7.SetActive(false); step8.SetActive(false); currentStep = 1; passiveDismissDelay = 0f; } }