//In progress public void DisconnectFromParentNonRec(GameObject otherElement) { CircuitElement parent = gameObject.GetComponentInParent <CircuitElement>(); if (parent != null) { if (LeftEdge) { parent.DisconnectFromLeft(otherElement); } else { parent.DisconnectFromRight(otherElement); } Desnap(otherElement.transform.position); edgeCollider.enabled = true; } else { Debug.LogWarning("Found an edge circle with disconnect problem"); } }
//In progress public void DisconnectFromParent(GameObject otherElement) { CircuitElement parent = gameObject.GetComponentInParent <CircuitElement> (); if (parent != null) { if (LeftEdge) { parent.DisconnectFromLeft(otherElement); } else { parent.DisconnectFromRight(otherElement); } otherElement.GetComponent <EdgeHandler>().ConnectToParentNonRec(gameObject); edgeGFX.color = Color.yellow; edgeCollider.enabled = true; } else { Debug.LogWarning("Found an edge circle with disconnect problem"); } }