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

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