protected override void OnPinConnected(NodePinConnectEvent pinConnectEvent) { if (_in1.WrappedType != typeof(NodePinTypeAny) || _in2.WrappedType != typeof(NodePinTypeAny)) { return; } if (pinConnectEvent.OtherPin.WrappedType == typeof(float)) { _in1 = ChangePinType <float>(_in1); _in2 = ChangePinType <float>(_in2); _out = ChangePinType <float>(_out); _onCalculate = CalculateFloat; } else if (pinConnectEvent.OtherPin.WrappedType == typeof(int)) { _in1 = ChangePinType <int>(_in1); _in2 = ChangePinType <int>(_in2); _out = ChangePinType <int>(_out); _onCalculate = CalculateInt; } }
protected virtual void OnPinConnected(NodePinConnectEvent pinConnectEvent) { }