Пример #1
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="outputInterface"></param>
        /// <param name="inputInterface"></param>
        /// <returns></returns>
        public static bool EstablishConnection(VisualScriptNodeInterfaceOutput outputInterface, VisualScriptNodeInterfaceInput inputInterface)
        {
            if (inputInterface.RequiredType == outputInterface.Transmission.GetType())
            {
                VisualScriptConnection connection =
                    new VisualScriptConnection()
                    {
                        _outputInterface = outputInterface,
                        _inputInterface = inputInterface
                    };

                outputInterface.Connections.Add(connection);
                inputInterface.Connections.Add(connection);

                return true;
            }

            return false;
        }
Пример #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="outputInterface"></param>
        /// <param name="inputInterface"></param>
        /// <returns></returns>
        public static bool EstablishConnection(VisualScriptNodeInterfaceOutput outputInterface, VisualScriptNodeInterfaceInput inputInterface)
        {
            if (inputInterface.RequiredType == outputInterface.Transmission.GetType())
            {
                VisualScriptConnection connection =
                    new VisualScriptConnection()
                {
                    _outputInterface = outputInterface,
                    _inputInterface  = inputInterface
                };

                outputInterface.Connections.Add(connection);
                inputInterface.Connections.Add(connection);

                return(true);
            }

            return(false);
        }