Exemple #1
0
 void UpdatePlayIcon()
 {
     if (!HasEngineInstance() || _hotSpotPlaySound == null)
     {
         return;
     }
     _hotSpotPlaySound.ShowStopIcon = EngineFmodSound.IsPlaying();
 }
Exemple #2
0
 /// <summary>
 ///  Play the sound in the editor (e.g. hotspot button pressed)
 /// </summary>
 public void TogglePlaySound()
 {
     if (!HasEngineInstance())
     {
         return;
     }
     if (EngineFmodSound.IsPlaying())
     {
         EngineFmodSound.Stop();
     }
     else
     {
         // Force the sound to play, even if we are not in play mode
         EngineFmodSound.Play(true);
     }
     UpdatePlayIcon();
 }