Example #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);
        }
    }
Example #2
0
 protected void OnRemainingTimeChangedEvent(LoseTimer sender)
 {
     if (RemainingTime <= 5f && RemainingTime > 0f && !sndCountdown.IsPlaying)
     {
         sndCountdown.Play();
     }
     else if (RemainingTime > 5f && sndCountdown.IsPlaying)
     {
         sndCountdown.Stop();
     }
 }
    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!");
        }
    }
Example #4
0
    public void OnBombBombCombineSndEvent(BombTile bombTile)
    {
        sndBombBombCombine.Play();
//		SoundManager.Instance.PlayOneShot(sndBombBombCombine);
    }
Example #5
0
 public void OnTriggerColorBombSndEvent(ColorBombTile colorBombTile)
 {
     sndTriggerColorBomb.Play();
 }
Example #6
0
 public void OnTriggerBombTileDestroySndEvent(BombTile bombTile)
 {
     sndTriggerBombTileDestroy.Play();
 }
Example #7
0
 public void OnTriggerBombTileFreezeSndEvent(BombTile bombTile)
 {
     sndTriggerBombTileFreeze.Play();
 }