コード例 #1
0
 public void DisposeFinal() //Used if you will not use this sound effect on this object again
 {
     if (SoundEffect != null)
     {
         SoundEffect.Dispose();
     }
 }
コード例 #2
0
        public static void Dispose()
        {
            Debug.Log("     Sounds...");
            string[] SoundNames = LoadedSounds.Keys.ToArray();
            for (int i = 0; i < LoadedSounds.Count; i++)
            {
                SoundEffect Snd = null;
                if (LoadedSounds.TryGetValue(SoundNames[i], out Snd))
                {
                    Snd.Dispose();
                    LoadedSounds.Remove(SoundNames[i]);
                }
            }

            Debug.Log("     Textures...");
            string[] TextureNames = Loaded2DTextures.Keys.ToArray();
            for (int i = 0; i < Loaded2DTextures.Count; i++)
            {
                Texture2D Tex = null;
                if (Loaded2DTextures.TryGetValue(TextureNames[i], out Tex))
                {
                    Tex.Dispose();
                    Loaded2DTextures.Remove(TextureNames[i]);
                }
            }

            Debug.Log("     Fonts...");
            LoadedFonts.Clear();
        }
コード例 #3
0
 public override void Hide()
 {
     _music.Stop();
     _music.Dispose();
     _soundEffect.Dispose();
     base.Hide();
 }
コード例 #4
0
 public static void Stop(SoundEffect soundEffect)
 {
     if (soundEffect != null)
     {
         soundEffect.Dispose();
     }
 }
コード例 #5
0
ファイル: SafeSoundEffect.cs プロジェクト: rosebud667/Pixel3D
 public void Dispose()
 {
     if (inner != null)
     {
         inner.Dispose();
     }
 }
コード例 #6
0
        public override void OnExit(GameTime gameTime)
        {
            KeyboardEventDispatcher.OnKeyPressed -= OnKeyPressed;

            foreach (var button in buttons)
            {
                button.OnButtonPress -= MenuScreen_OnButtonPress;
                button.OnMouseEntry  -= MenuScreen_OnMouseEntry;
                button.Dispose();
            }
            btnUp.Dispose();
            btnDown.Dispose();
            buttons = null;
            foreach (var bt in buttonsText)
            {
                bt.Dispose();
            }
            buttonsText = null;
            foreach (var t in tPanels)
            {
                t.Dispose();
            }
            tPanels = null;
            wr.Dispose();

            seHover.Dispose();
        }
コード例 #7
0
 public static void stop()
 {
     MediaPlayer.Stop();
     pickUp.Dispose();
     small.Dispose();
     big.Dispose();
 }
コード例 #8
0
        static void Main()
        {
            try
            {
                log4net.Config.XmlConfigurator.Configure();
                Log = log4net.LogManager.GetLogger(typeof(Program));

                Log.Info("Starting Allegiance Forms...");

                Application.ThreadException += ApplicationOnThreadException;
                AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;

                //Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new Forms.Menu());
            }
            catch (Exception e)
            {
                Log.Fatal("Entry Error - Entry", e);
            }
            finally
            {
                SoundEffect.Dispose();
            }
        }
コード例 #9
0
 private void Dispose(bool isDisposing)
 {
     if (isDisposing)
     {
         _xnaSoundEffect.Dispose();
     }
 }
コード例 #10
0
 public void UnloadContent()
 {
     if (playerSpriteSheet != null)
     {
         playerSpriteSheet.Dispose();
         playerDeathSound.Dispose();
     }
 }
コード例 #11
0
ファイル: CompanyScreen.cs プロジェクト: Antr0py/VoxelRTS
        public override void OnExit(GameTime gameTime)
        {
            KeyboardEventDispatcher.OnKeyPressed -= KeyboardEventDispatcher_OnKeyPressed;

            fxFire.Dispose();
            seiFire.Dispose();
            seFire.Dispose();
        }
コード例 #12
0
ファイル: PressEnterScreen.cs プロジェクト: Antr0py/VoxelRTS
        public override void OnExit(GameTime gameTime)
        {
            KeyboardEventDispatcher.OnKeyPressed -= KeyboardEventDispatcher_OnKeyPressed;

            tImage.Dispose();
            seiTheme.Dispose();
            seTheme.Dispose();
        }
コード例 #13
0
 public void UnloadContent()
 {
     if (bubblesTexture != null)
     {
         bubblesTexture.Dispose();
         bubblesSound.Dispose();
     }
 }
コード例 #14
0
 public override void Close()
 {
     if (mEffect != null)
     {
         mEffect.Dispose();
         mEffect = null;
     }
 }
コード例 #15
0
        public void Dispose()
        {
            if (mSoundEffect != null)
            {
                mSoundEffect.Dispose();
            }

            mSoundEffect = null;
        }
コード例 #16
0
        /// <summary>
        /// Unload content.
        /// </summary>
        protected override void UnloadContent()
        {
            _sndBeep.Dispose();

            if (FlxG.state != null)
            {
                FlxG.state.destroy();
            }
        }
コード例 #17
0
 protected override void DisposeData()
 {
     base.DisposeData();
     if (effect != null)
     {
         effect.Dispose();
     }
     effect = null;
 }
コード例 #18
0
        public void Uninitialize()
        {
            monoSoundEffect.Dispose();
            stereoSoundEffect.Dispose();
            continousMonoSoundEffect.Dispose();
            continousStereoSoundEffect.Dispose();

            defaultEngine.Dispose();
        }
コード例 #19
0
 /// <summary>
 /// UnloadContent will be called once per game and is the place to unload
 /// all content.
 /// </summary>
 protected override void UnloadContent()
 {
     _grassTexture.Dispose();
     _menuMove.Dispose();
     _menuSelect.Dispose();
     _menuBack.Dispose();
     _hud.Dispose();
     _soundEffect.Dispose();
 }
コード例 #20
0
 /// <summary>
 /// Frees up all resources used by this GDSoundStorageItem
 /// </summary>
 /// <param name="force">Whether to free up all SoundEffects strips and frames</param>
 public void Free(bool force)
 {
     // If the freeing is forced, remove all SoundEffects from memory
     if (force)
     {
         SoundFx.Dispose();
         SoundFx = null;
     }
 }
コード例 #21
0
        public override void OnExit(GameTime gameTime)
        {
            KeyboardEventDispatcher.OnKeyPressed -= KeyboardEventDispatcher_OnKeyPressed;

            rtLightning.Dispose();
            rtLightningPrev.Dispose();
            tLightning.Dispose();
            seLightning.Dispose();
            seThunder.Dispose();
        }
コード例 #22
0
        public void ReleaseEffect()
        {
            if (--mInstanceCount > 0)
            {
                return;
            }

            mSound?.Dispose();
            mSound = null;
        }
コード例 #23
0
ファイル: Audio.cs プロジェクト: Nagraal/Tactile-Engine
 public void Dispose()
 {
     if (Sound != null)
     {
         if (dispose_sound)
         {
             Sound.Dispose();
         }
     }
 }
コード例 #24
0
ファイル: SoundPool.cs プロジェクト: backviet/winengine
 public override void Dispose()
 {
     base.Dispose();
     foreach (SoundEffectInstance sf in freeObject)
     {
         sf.Dispose();
     }
     freeObject.Clear();
     sound.Dispose();
 }
コード例 #25
0
 public void Dispose()
 {
     if (_isDisposed)
     {
         return;
     }
     _soundEffectInstance.Stop();
     _soundEffectInstance.Dispose();
     _soundEffect.Dispose();
     _isDisposed = true;
 }
コード例 #26
0
 public void dispose()
 {
     for (int i = 0; i < _thisInstancesId.Count; i++)
     {
         if (_thisInstancesId[i] != -1)
         {
             instances[(int)_thisInstancesId[i]].Dispose();
         }
     }
     _sound.Dispose();
 }
コード例 #27
0
        /// <summary>
        /// UnloadContent will be called once per game and is the place to unload
        /// game-specific content.
        /// </summary>
        protected override void UnloadContent()
        {
            playerBulletSound.Dispose();
            enemyBulletSound.Dispose();

            playerHitSound.Dispose();

            gameOverSound.Dispose();

            dropPowerUpSound.Dispose();
            pickUpPowerUpSound.Dispose();
        }
コード例 #28
0
        protected override void DisposeManagedResources()
        {
            if (effect != null)
            {
                effect.Dispose();
            }

            if (sfxInstance != null)
            {
                sfxInstance.Dispose();
            }
        }
コード例 #29
0
        public void Dispose()
        {
            if (IsDisposed)
            {
                throw new ObjectDisposedException(this.ToString());
            }
            IsDisposed = true;

            if (soundFile != null)
            {
                soundFile.Dispose();
            }
        }
コード例 #30
0
 public void Kill()
 {
     if (fscMode)
     {
         HITVM.Get().StopFSC(fsc);
     }
     else
     {
         inst.Stop();
         inst.Dispose();
         sfx.Dispose();
     }
 }