public static void writeEndingSaveState(EndingSaveState state) { StringBuilder builder = new StringBuilder (); JsonWriter writer = new JsonWriter (builder); writer.PrettyPrint = true; writer.IndentValue = 2; JsonMapper.ToJson (state, writer); File.WriteAllText (JsonReader.getDocumentDir () + "/ending.json", builder.ToString ()); }
public void Load() { EndingSaveState saveState = JsonReader.readEndingSaveState(); this.isChapter2Activated = saveState.isChapter2Activated; this.isChapter2Completed = saveState.isChapter2Completed; this.endings = saveState.endings; this.deathReason = saveState.deathReason; }
static public void writeEndingSaveState(EndingSaveState state) { StringBuilder builder = new StringBuilder(); JsonWriter writer = new JsonWriter(builder); writer.PrettyPrint = true; writer.IndentValue = 2; JsonMapper.ToJson(state, writer); File.WriteAllText(JsonReader.getDocumentDir() + "/ending.json", builder.ToString()); }
public void Save() { EndingSaveState saveState = new EndingSaveState(); saveState.isChapter2Activated = this.isChapter2Activated; saveState.isChapter2Completed = this.isChapter2Completed; saveState.endings = this.endings; saveState.deathReason = this.deathReason; JsonReader.writeEndingSaveState(saveState); }
public void Save() { EndingSaveState saveState = new EndingSaveState (); saveState.isChapter2Activated = this.isChapter2Activated; saveState.isChapter2Completed = this.isChapter2Completed; saveState.endings = this.endings; saveState.deathReason = this.deathReason; JsonReader.writeEndingSaveState (saveState); }