public object Visit_DialogueMoodExpression(DialogueMoodExpression moodExpr) { DialogueData dialogue = Current["BlockData"] as DialogueData; dialogue.SetMood((string)moodExpr.Text.Accept(this)); return(0); }
public object Visit_DialogueActorExpression(DialogueActorExpression actorExpr) { DialogueData dialogue = Current["BlockData"] as DialogueData; dialogue.SetActorName((string)actorExpr.Text.Accept(this)); return(0); }
public object EnterBlockNode(string input) { last = Current; Current = new Environment(last); Current["BlockData"] = new DialogueData(); BlockValue stmt = Current[input] as BlockValue; return(Visit_BlockStatement(stmt.GetValue() as BlockStatement)); }
public object Visit_DialogueTextExpression(DialogueTextExpression txtMember) { DialogueData dialogue = Current["BlockData"] as DialogueData; dialogue.SetText((string)txtMember.Text.Accept(this)); if (txtMember.Next != null) { dialogue.SetDialoguePointer((string)txtMember.Next.Accept(this)); } return(0); }
public object Visit_DialogueChoiceExpression(DialogueChoiceExpression choiceMember) { if ((bool)choiceMember.Condition.Accept(this)) { DialogueData dialogue = Current["BlockData"] as DialogueData; DialogueChoice choice = new DialogueChoice(); string text = (string)choiceMember.Text.Accept(this); string next = (string)choiceMember.Next.Accept(this); choice.SetOption(text, next); dialogue.AddChoice(choice); } return(0); }