Пример #1
0
 public SoundEffectInstance GetTrackedInstance(GameSound gameSound, SoundEffectFinished callback)
 {
     var result = this[gameSound].CreateInstance();
     var tuple = new Tuple<GameSound, SoundEffectFinished>(gameSound, callback);
     this._trackingInstances.Add(result, tuple);
     return result;
 }
Пример #2
0
        public void Play(GameSound gameSound, SoundEffectFinished callback)
        {
            if (callback == null)
                throw new ArgumentNullException("callback");

            var soundEffectInstance = this._soundLibrary.GetTrackedInstance(gameSound, callback);
            soundEffectInstance.Play();
        }
Пример #3
0
        public void Play(GameSound gameSound, SoundEffectFinished callback)
        {
            if (callback == null)
                throw new ArgumentNullException("callback");

            var args = new SoundEffectFinishedEventArgs(gameSound);
            callback(this, args);
        }