Beispiel #1
0
 private void DrawLinkButtons(DialogueNode node)
 {
     if (_linkingNode == null)
     {
         if (GUILayout.Button("link"))
         {
             _linkingNode = node;
         }
     }
     else
     {
         if (node == _linkingNode)
         {
             if (GUILayout.Button("finish"))
             {
                 _linkingNode = null;
             }
         }
         else if (_linkingNode.ContainsChild(node.name))
         {
             if (GUILayout.Button("unlink"))
             {
                 _linkingNode.RemoveChild(node.name);
             }
         }
         else
         {
             if (GUILayout.Button("child"))
             {
                 _linkingNode.AddChild(node.name);
             }
         }
     }
 }