public void OnInputClicked(InputClickedEventData eventData) { //Needs: SourceName, TargetName, ActuatorOperation, ConditionOperator, rightSide of Condition as String //SensActConnection.commands targetCommand; SenActFensterName = this.gameObject.transform.parent.name; SenActFenster = this.gameObject.transform.parent.gameObject; this.LineID = SenActFenster.GetComponent <LogicSenActInput>().LineID; this.SourceNamelong = SenActFenster.GetComponent <LogicSenActInput>().SourceName; this.TargetNamelong = SenActFenster.GetComponent <LogicSenActInput>().TargetName; this.condOperator = SenActFenster.GetComponent <LogicSenActInput>().GetOperator(); bool targetOp = SenActFenster.GetComponent <LogicSenActInput>().GetTargetStatus(); if (!targetOp) { targetCommand = SensActConnection.commands.OFF; } else { targetCommand = SensActConnection.commands.ON; } Item source = ItemManager.getInstance().getItem(SourceNamelong); Item target = ItemManager.getInstance().getItem(TargetNamelong); if (source is NfcReader || source is MyoArmband) { this.rightSideString = SenActFenster.GetComponent <LogicSenActInput>().GetSenValueString(); } else { this.rightSide = SenActFenster.GetComponent <LogicSenActInput>().GetSenValue(); } if (source is Sensor && target is Actuator) { if (!ConnectionManager.getInstance().getConnections().ContainsKey(LineID)) { Sensor sSens = (Sensor)source; Actuator tDimmer = (Actuator)target; if (source is NfcReader || source is MyoArmband) { if (source is NfcReader) { NfcReader nfcr = (NfcReader)source; nc = ConnectionCreator.createNfcActConnection(LineID, SourceNamelong, TargetNamelong, rightSideString, condOperator, targetCommand); } else { MyoArmband myoa = (MyoArmband)source; mc = ConnectionCreator.createMyoActConnection(LineID, SourceNamelong, TargetNamelong, rightSideString, condOperator, targetCommand); } } else { c = ConnectionCreator.createSensActConnection(LineID, SourceNamelong, TargetNamelong, rightSide, condOperator, targetCommand); } ConnectionManager.getInstance().startConnection(LineID); } else { if (source is NfcReader || source is MyoArmband) { if (source is NfcReader) { nc = (NfcActConnection)ConnectionManager.getInstance().getConnection(LineID); } else { mc = (MyoActConnection)ConnectionManager.getInstance().getConnection(LineID); } } else { c = (SensActConnection)ConnectionManager.getInstance().getConnection(LineID); } ConnectionManager.getInstance().startConnection(LineID); } } SenActFenster.transform.GetChild(1).transform.localScale = new Vector3(0.1f, 0.1f, 0.1f); this.transform.localScale = new Vector3(0, 0, 0); }