예제 #1
0
    IEnumerator PlaySound()
    {
        SoundEffectController soundEffect = SoundManager.Instance["hourglass_sfx"];
        WaitForSeconds        waitTime    = new WaitForSeconds(soundEffect.SoundClip.length / soundEffect.sound.pitch);

        for (int i = 0; i < soundPlays; ++i)
        {
            soundEffect.Play();
            yield return(waitTime);
        }
    }
예제 #2
0
 protected void OnRemainingTimeChangedEvent(LoseTimer sender)
 {
     if (RemainingTime <= 5f && RemainingTime > 0f && !sndCountdown.IsPlaying)
     {
         sndCountdown.Play();
     }
     else if (RemainingTime > 5f && sndCountdown.IsPlaying)
     {
         sndCountdown.Stop();
     }
 }
예제 #3
0
    public void Play(string soundId)
    {
        SoundEffectController sndController = this[soundId];

        if (sndController != null)
        {
            sndController.Play();
        }
        else
        {
            Debug.LogWarning("[SoundManager] Can't find sound with id: " + soundId + " for Play!");
        }
    }
예제 #4
0
    public void OnBombBombCombineSndEvent(BombTile bombTile)
    {
        sndBombBombCombine.Play();
//		SoundManager.Instance.PlayOneShot(sndBombBombCombine);
    }
예제 #5
0
 public void OnTriggerColorBombSndEvent(ColorBombTile colorBombTile)
 {
     sndTriggerColorBomb.Play();
 }
예제 #6
0
 public void OnTriggerBombTileDestroySndEvent(BombTile bombTile)
 {
     sndTriggerBombTileDestroy.Play();
 }
예제 #7
0
 public void OnTriggerBombTileFreezeSndEvent(BombTile bombTile)
 {
     sndTriggerBombTileFreeze.Play();
 }