コード例 #1
0
 //Save the whole state of this saveState
 public void saveNewGame()
 {
     state = new SaveState(true);
     // dont update the username and password when making new game
     if (!"".Equals(GameManager.instance.saveFile.username))
     {
         state.username = GameManager.instance.saveFile.username;
         state.password = GameManager.instance.saveFile.password;
     }
     PlayerPrefs.SetString("save", OtherMethod.serialize <SaveState>(state));
     GameManager.instance.saveFile = state;
 }
コード例 #2
0
 // save the game when updated
 public void saveAndUpdate()
 {
     state = GameManager.instance.saveFile;
     PlayerPrefs.SetString("save", OtherMethod.serialize <SaveState>(state));
 }