示例#1
0
        public object Visit_DialogueMoodExpression(DialogueMoodExpression moodExpr)
        {
            DialogueData dialogue = Current["BlockData"] as DialogueData;

            dialogue.SetMood((string)moodExpr.Text.Accept(this));

            return(0);
        }
示例#2
0
        public object Visit_DialogueActorExpression(DialogueActorExpression actorExpr)
        {
            DialogueData dialogue = Current["BlockData"] as DialogueData;

            dialogue.SetActorName((string)actorExpr.Text.Accept(this));

            return(0);
        }
示例#3
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));
        }
示例#4
0
        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);
        }
示例#5
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);
        }