public void SaveAccount() // 게임 저장 { AccountData account; account = new AccountData(numOfLux, totalExperienceOfSunGirl, listOfConstellation); BinaryFile.BinarySerialize <AccountData>(account, Application.persistentDataPath + "/SaveFile/LocalAccount/LocalAccount"); }
public void NewAccount() // 새 게임(새 계정) { AccountData account; listOfConstellation = new List <ConstellationDictionary>(); listOfConstellation.Add(new ConstellationDictionary("Aries", 0, string.Format("양자리\n\n전후방의 적들에게 일격을 가합니다."), true)); listOfConstellation.Add(new ConstellationDictionary("Sagittarius", 0, string.Format("사수자리\n\n활을 쏘아 원거리로 공격합니다."), false)); listOfConstellation.Add(new ConstellationDictionary("Sagittarius", 0, string.Format("사수자리\n\n활을 쏘아 원거리로 공격합니다."), false)); listOfConstellation.Add(new ConstellationDictionary("Sagittarius", 0, string.Format("사수자리\n\n활을 쏘아 원거리로 공격합니다."), false)); account = new AccountData(1000, 0, listOfConstellation); BinaryFile.BinarySerialize <AccountData>(account, Application.persistentDataPath + "/SaveFile/LocalAccount/LocalAccount"); account = BinaryFile.BinaryDeserialize <AccountData>(Application.persistentDataPath + "/SaveFile/LocalAccount/LocalAccount"); numOfLux = account.numOfLux; listOfConstellation = account.listOfConstellation; }