예제 #1
0
 protected void OnRemainingTimeChangedEvent(LoseTimer sender)
 {
     if (RemainingTime <= 5f && RemainingTime > 0f && !sndCountdown.IsPlaying)
     {
         sndCountdown.Play();
     }
     else if (RemainingTime > 5f && sndCountdown.IsPlaying)
     {
         sndCountdown.Stop();
     }
 }
예제 #2
0
    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!");
        }
    }