Inheritance: ExpressionDialogueNode
Exemplo n.º 1
0
        private void PrintAssertDialogueNode(AssertDialogueNode pAssertNode)
        {
            Indentation();

            _output.Append("ASSERT " + pAssertNode.expression + "\n");

            DialogueNode nextNode = _dialogueRunner.GetDialogueNode(_conversation, pAssertNode.nextNode);
            SwitchOnNode(nextNode);
        }
Exemplo n.º 2
0
        private void PrintAssertDialogueNode(AssertDialogueNode pAssertNode)
        {
            Indentation();

            _output.Append("ASSERT " + pAssertNode.expression + "\n");

            DialogueNode nextNode = _dialogueRunner.GetDialogueNode(_conversation, pAssertNode.nextNode);

            SwitchOnNode(nextNode);
        }
Exemplo n.º 3
0
        private DialogueNode VisitAssertDialogueNode(DialogueNode pPrevious)
        {
                        #if DEBUG_WRITE
            Console.WriteLine("VisitAssertDialogueNode()");
                        #endif

            match(Token.TokenType.ASSERT);

            string   expressionName = "";
            string[] args           = VisitFunctionCall(out expressionName);

            AssertDialogueNode n = _dialogueRunner.Create <AssertDialogueNode>(_conversationName, _language, (_nodeCounter++) + " (assert)");
            n.expression = expressionName;
            n.args       = args;

            if (!_dialogueRunner.HasExpression(expressionName))
            {
                throw new GrimmException("There is no '" + expressionName + "' expression registered in the dialogue runner");
            }

            AddLinkFromPreviousNode(pPrevious, n);

            return(n);
        }