コード例 #1
0
ファイル: DialogNode.cs プロジェクト: Laharnar/EngineAndMagic
    public override Node Create(Vector2 pos)
    {
        DialogNode node = CreateInstance <DialogNode>();

        node.rect = new Rect(pos.x, pos.y, 300, 210);
        node.name = "Dailog Node";

        //Previous Node Connections
        node.CreateInput("Previous Node", "DialogForward", NodeSide.Left, 30);
        node.CreateOutput("Back Node", "DialogBack", NodeSide.Left, 50);

        //Next Node to go to
        node.CreateOutput("Next Node", "DialogForward", NodeSide.Right, 30);
        node.CreateInput("Return Node", "DialogBack", NodeSide.Right, 50);

        node.SayingCharacterName    = "Morgen Freeman";
        node.WhatTheCharacterSays   = "I'm GOD";
        node.SayingCharacterPotrait = null;

        return(node);
    }
コード例 #2
0
    public override Node Create(Vector2 pos)
    {
        DialogNode node = CreateInstance <DialogNode>();

        //node.rect = new Rect(pos.x, pos.y, 300, 230);
        node.rect.position = pos;
        node.name          = "Dialog Node";

        //Previous Node Connections
        node.CreateInput("Previous Node", "DialogForward", NodeSide.Left, 30);
        node.CreateOutput("Back Node", "DialogBack", NodeSide.Left, 50);

        //Next Node to go to
        node.CreateOutput("Next Node", "DialogForward", NodeSide.Right, 30);
        node.CreateInput("Return Node", "DialogBack", NodeSide.Right, 50);

        node.CharacterName    = "Character Name";
        node.DialogLine       = "Insert dialog text here";
        node.CharacterPotrait = null;

        return(node);
    }