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); } }
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!"); } }
public void OnBombBombCombineSndEvent(BombTile bombTile) { sndBombBombCombine.Play(); // SoundManager.Instance.PlayOneShot(sndBombBombCombine); }
public void OnTriggerColorBombSndEvent(ColorBombTile colorBombTile) { sndTriggerColorBomb.Play(); }
public void OnTriggerBombTileDestroySndEvent(BombTile bombTile) { sndTriggerBombTileDestroy.Play(); }
public void OnTriggerBombTileFreezeSndEvent(BombTile bombTile) { sndTriggerBombTileFreeze.Play(); }