protected void OnRemainingTimeChangedEvent(LoseTimer sender) { if (RemainingTime <= 5f && RemainingTime > 0f && !sndCountdown.IsPlaying) { sndCountdown.Play(); } else if (RemainingTime > 5f && sndCountdown.IsPlaying) { sndCountdown.Stop(); } }
public void Stop(string soundId) { SoundEffectController sndController = this[soundId]; if (sndController != null) { sndController.Stop(); } else { Debug.LogWarning("[SoundManager] Can't find sound with id: " + soundId + " for Stop!"); } }