public void Test() { DialogueScript script = new DialogueScript(); script.Parse(script_1); script.Interpreter.PreVisit(); DialogueData data = (DialogueData)script.Interpreter.EnterBlockNode("Start"); Assert.IsTrue(data.Text == "Test one"); Assert.IsTrue(data.Choices[0].Text == "Test choice one"); Assert.IsTrue(data.Choices[1].Text == "Test choice two"); Assert.IsTrue(data.Choices[2].Text == "Test choice three"); Assert.IsTrue(data.Choices[0].Next == "Test"); Assert.IsTrue(data.Choices[1].Next == "Test"); Assert.IsTrue(data.Choices[2].Next == "Test"); Assert.Pass(); }
public void ReadScript(string script) { dialogueScript.Parse(script); dialogueScript.Interpreter.PreVisit(); }