public void AddDevice(BaseDeviceActions device) { if (deviceA == null) { deviceA = device; } else { deviceB = device; SwitchDevices(); } }
private void MoveDeviceToNode(BaseDeviceActions deviceBaseAction, Node node) { Node oldNode = deviceBaseAction.GetParentNode(); //new node settings node.deviceBlueprint = oldNode.deviceBlueprint; node.device = oldNode.device; //device settings deviceBaseAction.SetParentNode(node); deviceBaseAction.gameObject.transform.position = node.gameObject.transform.position; //old node settings oldNode.deviceBlueprint = null; oldNode.device = null; }
private void ResetDevices() { deviceA = null; deviceB = null; }