private void ShowSelectionNode(string node, MonoSelectionNode monoEvent) { GameObject go = new GameObject(node); go.transform.SetParent(monoEvent.transform); go.transform.position = Vector3.zero; MonoTalkNode selectionNode = go.AddComponent <MonoTalkNode> (); selectionNode.Init((TalkNode)m_selectionNode.m_selection [node]); }
private MonoTalkNode ShowSelectionTalkNode(DialogNode node, MonoSelectionNode monoEvent) { GameObject go = new GameObject(node.m_name + "-" + node.m_dialogType); go.transform.SetParent(monoEvent.transform); go.transform.position = Vector3.zero; MonoTalkNode talkNode = go.AddComponent <MonoTalkNode> (); talkNode.Init((TalkNode)node); return(talkNode); }
private void ShowNode(DialogNode node, MonoDialogEvent monoEvent) { GameObject go = new GameObject(node.m_name + "-" + node.m_dialogType); go.transform.SetParent(monoEvent.transform); go.transform.position = Vector3.zero; switch (node.m_dialogType) { case DialogNode.NodeType.Selection: MonoSelectionNode selectionNode = go.AddComponent <MonoSelectionNode> (); selectionNode.Init((SelectionNode)node); break; case DialogNode.NodeType.Talk: MonoTalkNode talkNode = go.AddComponent <MonoTalkNode> (); talkNode.Init((TalkNode)node); break; } }