private void ExecutePostEvents(DialogBaseNode node) { foreach (NodeEvent e in node.onCompleteEvents) { e.Invoke(); } }
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; }
void Start() { rootNode = NodeGraph.GetDialogRoot(); if (null == rootNode) { return; } curNode = rootNode.GetNextDialog(); }
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(); } } }