Пример #1
0
 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 ());
 }
Пример #2
0
    public void Load()
    {
        EndingSaveState saveState = JsonReader.readEndingSaveState();

        this.isChapter2Activated = saveState.isChapter2Activated;
        this.isChapter2Completed = saveState.isChapter2Completed;
        this.endings             = saveState.endings;
        this.deathReason         = saveState.deathReason;
    }
Пример #3
0
    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());
    }
Пример #4
0
    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);
    }
Пример #5
0
 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);
 }