/// <summary> /// Starts the json reading process. /// </summary> public void StartReadingTextAssets() { TextAssets = new TextAssets(); TextAssets.Answers = ReadAnswers(); TextAssets.Questions = ReadQuestions(TextAssets.Answers); TextAssets.Greetings = ReadGreetings(); TextAssets.Adventures = ReadAdventures(); }
/// <summary> /// Load ini from disk and parse it /// </summary> public override void ReadFromDisk() { string text; if (!File.Exists(path)) { // local file does not exist, load from default text = TextAssets.Find(name).text; } else { text = File.ReadAllText(path); } if (text == null) { return; } var parser = new Ini(path); data = parser.Parse(text); }