private void MouseOverNode(DNANode node) { if (editMode == EditMode.CreateDNA) { return; } if (!isClicking) { return; } if (firstConNode == null) { firstConNode = node; if (ConnectionLine == null) { ConnectionLine = Instantiate(ConnectionLinePrefub); } return; } if (secondConNode == null && firstConNode != node) { secondConNode = node; } }
private void MouseExitNode(DNANode node) { if (editMode == EditMode.CreateDNA) { return; } if (secondConNode != null && node == secondConNode) { secondConNode = null; } }
private void MouseButtonUp() { if (editMode == EditMode.CreateDNA) { return; } if (firstConNode != null && secondConNode != null) { ConnectionLine = null; connectionsCount++; updateVirusMetaInfo(); } else { if (ConnectionLine != null) { Destroy(ConnectionLine.gameObject); ConnectionLine = null; } } firstConNode = null; secondConNode = null; }