void OnInletReceived(Signal signal) { // pass on the signal m_outlet.Send(signal); OnSignalReceived(signal); }
void OnInlet1Received(Signal signal) { if (Value) { m_outlet.Send(signal.Args); } }
void OnBroadcastedSignalReceived(string id, Signal signal) { if (id == ReceiveName) { m_outlet.Send(signal); } }
void OnInletReceived(Signal signal) { if (signal.Args.Type == SignalTypes.STRING) { Value = ((SignalStringArgs)signal.Args).Value; } outlet.Send(new SignalStringArgs(Value)); }
void OnInletReceived(Signal signal) { if (signal.Args.Type == SignalTypes.FLOAT) { Value = ((SignalFloatArgs)signal.Args).Value; } m_outlet.Send(new SignalFloatArgs(Value)); }
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())); } } }
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; } } }
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); } } } }
void OnMasterOutletReceivedSignal(Signal signal) { m_outlet.Send(signal); }
void GenerateBang() { m_outlet.Send(new SignalArgs()); }
void FireSignalOnOutlet2() { outlet2.Send(new SignalArgs()); }
void OnInletOneReceivedSignal(Signal signal) { outlet1.Send(signal.Args); Debug.Log("Received signal!"); }
void OnInletReceived(Signal signal) { // any signal gets converted to bang outlet.Send(new SignalArgs()); }