Пример #1
0
 void OnDoubleClick()
 {
     if (doubleClick.IsNotEmpty())
     {
         AudioBridge.Play(doubleClick);
     }
 }
Пример #2
0
 void OnClick()
 {
     if (click.IsNotEmpty())
     {
         AudioBridge.Play(click);
     }
 }
Пример #3
0
 void OnSelect(bool selected)
 {
     if (selected && select.IsNotEmpty())
     {
         AudioBridge.Play(select);
     }
     else if (!selected && deselect.IsNotEmpty())
     {
         AudioBridge.Play(deselect);
     }
 }
Пример #4
0
 void OnPress(bool pressed)
 {
     if (pressed && press.IsNotEmpty())
     {
         AudioBridge.Play(press);
     }
     else if (!pressed && release.IsNotEmpty())
     {
         AudioBridge.Play(release);
     }
 }
Пример #5
0
 void OnHover(bool isOver)
 {
     if (isOver && hoverOver.IsNotEmpty())
     {
         AudioBridge.Play(hoverOver);
     }
     else if (!isOver && hoverOut.IsNotEmpty())
     {
         AudioBridge.Play(hoverOut);
     }
 }
Пример #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);
            }
        }
Пример #7
0
 protected virtual void PlayAudio()
 {
     #if NGUI_AUDIO
     AudioBridge.Play(GetType().Name);
     #endif
 }