public void PlaySound(int soundIdx) { PooledCue pc = CuePool[soundIdx].New(); pc.Play(); CuesInUse.Add(pc); }
/// <summary> /// Adds a new pool of sounds /// </summary> /// <param name="sound"></param> /// <param name="poolSize"></param> public void AddSound(string sound, int poolSize) { CuePool.Add(new Pool <PooledCue>(poolSize, true, s => !s.IsDisposed, () => PooledCue.PoolConstructor(SoundBank, sound))); }