Ejemplo n.º 1
0
 public void Dispose()
 {
     this.CancelAllSoundEffects();
     this.soundEffects.Clear();
     this.isDisposed = true;
     soundFXInstance = null;
 }
Ejemplo n.º 2
0
        private SoundFX(IGameContext context)
        {
            this.context      = context;
            this.isMuted      = false;
            this.soundEffects = new Dictionary <String, SoundEffect>();

            //reset singleton instance
            soundFXInstance = this;
        }
Ejemplo n.º 3
0
 public static SoundFX Create(IGameContext context)
 {
     soundFXInstance?.CancelAllSoundEffects();
     soundFXInstance = soundFXInstance ?? new SoundFX(context);
     return(soundFXInstance);
 }