Esempio n. 1
0
 private void DrawLinkButtons(DialogueNode node)
 {
     if (linkingParentNode == null)
     {
         if (GUILayout.Button("LINK"))
         {
             linkingParentNode = node;
         }
     }
     else if (linkingParentNode == node)
     {
         if (GUILayout.Button("CANCEL"))
         {
             linkingParentNode = null;
         }
     }
     else if (linkingParentNode.GetChildrenIDs().Contains(node.name))
     {
         if (GUILayout.Button("UNLINK"))
         {
             linkingParentNode.RemoveChildNode(node.name);
             linkingParentNode = null;
         }
     }
     else
     {
         if (GUILayout.Button("CHILD"))
         {
             linkingParentNode.AddChildNode(node.name);
             linkingParentNode = null;
         }
     }
 }