예제 #1
0
 private void ExecutePostEvents(DialogBaseNode node)
 {
     foreach (NodeEvent e in node.onCompleteEvents)
     {
         e.Invoke();
     }
 }
예제 #2
0
 private void ExecutePreEvents(DialogBaseNode node)
 {
     foreach (NodeEvent e in node.onStartEvents)
     {
         e.Invoke();
     }
 }
        public override void OnHeaderGUI()
        {
            DialogBaseNode  node  = target as DialogBaseNode;
            DialogNodeGraph graph = node.graph as DialogNodeGraph;

            node.name = node.DialogueName;
            GUILayout.Label(node.DialogueName, NodeEditorResources.styles.nodeHeader, GUILayout.Height(30));
            GUI.color = Color.white;
        }
예제 #4
0
 void Start()
 {
     rootNode = NodeGraph.GetDialogRoot();
     if (null == rootNode)
     {
         return;
     }
     curNode = rootNode.GetNextDialog();
 }
예제 #5
0
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.A))
     {
         if (null == curNode)
         {
             return;
         }
         if (curNode is BranchNodeBase)
         {
             BranchNodeBase branchNode = curNode as BranchNodeBase;
             branchNode.ReadNode();
             curNode = branchNode.GetNextDialog(0);
         }
         else
         {
             curNode.ReadNode();
             curNode = curNode.GetNextDialog();
         }
     }
 }