Beispiel #1
0
 // Subscribe to specified signal to play clip with specified name.
 private void SubscribeClipToSignal(string signal, string clipName)
 {
     Signals.AddListener
     (
         signal,
         () =>
     {
         Play(clipName);
     }
     );
 }
Beispiel #2
0
        // Subscribe on specified signal using specified handler
        private void SubscribeOnSignal(string name, Action handler)
        {
            UiLayoutSettings.Signal signal = Expansion.Instance.LayoutSettings.Signals.Find(x => x.Id == name);

            if (signal != null)
            {
                Signals.AddListener(signal.Id, handler);
                Signals.AddListener(signal.Name, handler);
            }
            else
            {
                Signals.AddListener(name, handler);
            }
        }
Beispiel #3
0
 /// <summary>
 /// Initializes the UtilityTime class.
 /// </summary>
 static UtilityTime()
 {
     Signals.AddListener(Expansion.SIGNAL_FRAME_START, Update);
 }