Пример #1
0
        void OnInletReceived(Signal signal)
        {
            // pass on the signal
            m_outlet.Send(signal);

            OnSignalReceived(signal);
        }
Пример #2
0
 void OnInlet1Received(Signal signal)
 {
     if (Value)
     {
         m_outlet.Send(signal.Args);
     }
 }
Пример #3
0
 void OnBroadcastedSignalReceived(string id, Signal signal)
 {
     if (id == ReceiveName)
     {
         m_outlet.Send(signal);
     }
 }
Пример #4
0
        void OnInletReceived(Signal signal)
        {
            if (signal.Args.Type == SignalTypes.STRING)
            {
                Value = ((SignalStringArgs)signal.Args).Value;
            }

            outlet.Send(new SignalStringArgs(Value));
        }
Пример #5
0
        void OnInletReceived(Signal signal)
        {
            if (signal.Args.Type == SignalTypes.FLOAT)
            {
                Value = ((SignalFloatArgs)signal.Args).Value;
            }

            m_outlet.Send(new SignalFloatArgs(Value));
        }
Пример #6
0
        void Update()
        {
            if (m_on)
            {
                m_time += Time.deltaTime;

                if (m_time > m_interval)
                {
                    m_time %= m_interval;

                    // sendout bang
                    m_outlet.Send(new Signal(m_outlet, new SignalArgs()));
                }
            }
        }
Пример #7
0
 void OnInputReceived(Signal signal)
 {
     if (signal.Args.Type == SignalTypes.BANG)
     {
         SignalFloatArgs args = new SignalFloatArgs();
         args.Value = Random.Range(0, Range);
         outlet.Send(args);
     }
     else
     {
         int val = 0;
         if (Signal.TryParseInt(signal.Args, out val))
         {
             Range = val;
         }
     }
 }
Пример #8
0
        void Update()
        {
            if (m_signalsToAdd.Count > 0)
            {
                foreach (DelayedSignal delayedSignal in m_signalsToAdd)
                {
                    m_delayedSignals.Add(delayedSignal);
                }

                m_signalsToAdd.Clear();
            }

            if (m_delayedSignals.Count > 0)
            {
                List <DelayedSignal> SignalsToRemove = null;

                foreach (DelayedSignal delayedSignal in m_delayedSignals)
                {
                    delayedSignal.RunningTime += Time.deltaTime;
                    if (delayedSignal.RunningTime > Delay)
                    {
                        m_outlet.Send(delayedSignal.Signal.Args);

                        if (SignalsToRemove == null)
                        {
                            SignalsToRemove = new List <DelayedSignal>();
                        }

                        SignalsToRemove.Add(delayedSignal);
                    }
                }

                if (SignalsToRemove != null)
                {
                    foreach (DelayedSignal delayedSignal in SignalsToRemove)
                    {
                        m_delayedSignals.Remove(delayedSignal);
                    }
                }
            }
        }
Пример #9
0
 void OnMasterOutletReceivedSignal(Signal signal)
 {
     m_outlet.Send(signal);
 }
Пример #10
0
 void GenerateBang()
 {
     m_outlet.Send(new SignalArgs());
 }
Пример #11
0
 void FireSignalOnOutlet2()
 {
     outlet2.Send(new SignalArgs());
 }
Пример #12
0
        void OnInletOneReceivedSignal(Signal signal)
        {
            outlet1.Send(signal.Args);

            Debug.Log("Received signal!");
        }
Пример #13
0
 void OnInletReceived(Signal signal)
 {
     // any signal gets converted to bang
     outlet.Send(new SignalArgs());
 }