private void EmptyPipesRecursively()
 {
     SetFill(FillType.None);
     fillCoroutine = null;
     while (sourcedPipes.Count > 0)
     {
         PipeMinigamePipe pipe = sourcedPipes[0];
         sourcedPipes.RemoveAt(0);
         pipe.EmptyPipesRecursively();
     }
     sourcedPipes.Clear();
 }
 // Update is called once per frame
 void Update()
 {
     if (this == Selected)
     {
         transform.position = Input.mousePosition + new Vector3(-50, 50);
         if (Input.GetKeyDown(KeyCode.R))
         {
             Rotate();
         }
     }
     if (Input.GetKeyDown(KeyCode.Mouse1))
     {
         if (null != Selected)
         {
             Selected.Element.enabled = true;
             Selected = null;
         }
     }
 }
 void IPointerClickHandler.OnPointerClick(PointerEventData data)
 {
     if (data.button == PointerEventData.InputButton.Left)
     {
         PipeNodes selectedNodes = (PipeNodes)(-1);
         if (null != Selected)
         {
             Selected.Element.enabled = true;
             selectedNodes            = Selected.Nodes;
             Selected.SetTypes(selectedNodes, false);
             Selected.SetTypes(Nodes, true);
             Selected.SetFill(FillType.None);
             SetTypes(Nodes, false);
             SetTypes(selectedNodes, true);
             Selected = null;
         }
         else
         {
             Selected        = this;
             Element.enabled = false;
             SetFill(FillType.None);
         }
     }
 }