Example #1
0
 void OnDoubleClick()
 {
     if (doubleClick.IsNotEmpty())
     {
         AudioBridge.Play(doubleClick);
     }
 }
Example #2
0
 void OnClick()
 {
     if (click.IsNotEmpty())
     {
         AudioBridge.Play(click);
     }
 }
Example #3
0
 void OnSelect(bool selected)
 {
     if (selected && select.IsNotEmpty())
     {
         AudioBridge.Play(select);
     }
     else if (!selected && deselect.IsNotEmpty())
     {
         AudioBridge.Play(deselect);
     }
 }
Example #4
0
 void OnPress(bool pressed)
 {
     if (pressed && press.IsNotEmpty())
     {
         AudioBridge.Play(press);
     }
     else if (!pressed && release.IsNotEmpty())
     {
         AudioBridge.Play(release);
     }
 }
Example #5
0
 void OnHover(bool isOver)
 {
     if (isOver && hoverOver.IsNotEmpty())
     {
         AudioBridge.Play(hoverOver);
     }
     else if (!isOver && hoverOut.IsNotEmpty())
     {
         AudioBridge.Play(hoverOut);
     }
 }
Example #6
0
        private void InitializeAudioBridge()
        {
            try
            {
                m_audioBridge = new AudioBridge(StkAudioEngine)
                {
                    AudioOutput = StkAudioEngine.AudioOutput
                };
                AudioSettings.OnAudioConfigurationChanged += AudioSettings_OnAudioConfigurationChanged;

                AudioSettings_OnAudioConfigurationChanged(false);

                m_soundToolKitMixer = (AudioMixer)Resources.Load(MIXER_PATH);
            }
            catch (Exception e)
            {
                SoundToolKitDebug.LogError("Message: " + e.Message + "\nStack Trace: " + e.InnerException);
            }
        }
Example #7
0
 protected virtual void PlayAudio()
 {
     #if NGUI_AUDIO
     AudioBridge.Play(GetType().Name);
     #endif
 }