コード例 #1
0
        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;
            }
        }
コード例 #2
0
ファイル: Node.cs プロジェクト: Trainfire/TurnBasedStrategy
 protected virtual void OnPinConnected(NodePinConnectEvent pinConnectEvent)
 {
 }