public void playSound(PowerupSounds soundType) { if (bSoundEnabled) { asPowerupSounds[(int)soundType].Play(); } }
public bool isPlaying(PowerupSounds sound) { if (asPowerupSounds[(int)sound].isPlaying) { return(true); } else { return(false); } }
/* * FUNCTION: Stops all sounds except background music */ public void stopAllSounds() { for (int i = 0; i < CharacterSounds.GetValues(typeof(CharacterSounds)).Length; i++) { asCharacterSounds [i].Stop(); } for (int i = 0; i < PowerupSounds.GetValues(typeof(PowerupSounds)).Length; i++) { asPowerupSounds [i].Stop(); } for (int i = 0; i < MenuSounds.GetValues(typeof(MenuSounds)).Length; i++) { asMenuSounds [i].Stop(); } for (int i = 0; i < EnemySounds.GetValues(typeof(EnemySounds)).Length; i++) { asEnemySounds [i].Stop(); } bFootstepsPlaying = false; }
public bool isPlaying (PowerupSounds sound) { if (asPowerupSounds [(int)sound].isPlaying) return true; else return false; }
public void stopSound (PowerupSounds soundType) { asPowerupSounds [(int)soundType].Stop (); }
public void playSound (PowerupSounds soundType) { if (bSoundEnabled) asPowerupSounds [(int)soundType].Play (); }
// Use this for initialization void Start() { inst = this; }
public void stopSound(PowerupSounds soundType) { asPowerupSounds[(int)soundType].Stop(); }