public void DisposeFinal() //Used if you will not use this sound effect on this object again { if (SoundEffect != null) { SoundEffect.Dispose(); } }
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(); }
public override void Hide() { _music.Stop(); _music.Dispose(); _soundEffect.Dispose(); base.Hide(); }
public static void Stop(SoundEffect soundEffect) { if (soundEffect != null) { soundEffect.Dispose(); } }
public void Dispose() { if (inner != null) { inner.Dispose(); } }
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(); }
public static void stop() { MediaPlayer.Stop(); pickUp.Dispose(); small.Dispose(); big.Dispose(); }
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(); } }
private void Dispose(bool isDisposing) { if (isDisposing) { _xnaSoundEffect.Dispose(); } }
public void UnloadContent() { if (playerSpriteSheet != null) { playerSpriteSheet.Dispose(); playerDeathSound.Dispose(); } }
public override void OnExit(GameTime gameTime) { KeyboardEventDispatcher.OnKeyPressed -= KeyboardEventDispatcher_OnKeyPressed; fxFire.Dispose(); seiFire.Dispose(); seFire.Dispose(); }
public override void OnExit(GameTime gameTime) { KeyboardEventDispatcher.OnKeyPressed -= KeyboardEventDispatcher_OnKeyPressed; tImage.Dispose(); seiTheme.Dispose(); seTheme.Dispose(); }
public void UnloadContent() { if (bubblesTexture != null) { bubblesTexture.Dispose(); bubblesSound.Dispose(); } }
public override void Close() { if (mEffect != null) { mEffect.Dispose(); mEffect = null; } }
public void Dispose() { if (mSoundEffect != null) { mSoundEffect.Dispose(); } mSoundEffect = null; }
/// <summary> /// Unload content. /// </summary> protected override void UnloadContent() { _sndBeep.Dispose(); if (FlxG.state != null) { FlxG.state.destroy(); } }
protected override void DisposeData() { base.DisposeData(); if (effect != null) { effect.Dispose(); } effect = null; }
public void Uninitialize() { monoSoundEffect.Dispose(); stereoSoundEffect.Dispose(); continousMonoSoundEffect.Dispose(); continousStereoSoundEffect.Dispose(); defaultEngine.Dispose(); }
/// <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(); }
/// <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; } }
public override void OnExit(GameTime gameTime) { KeyboardEventDispatcher.OnKeyPressed -= KeyboardEventDispatcher_OnKeyPressed; rtLightning.Dispose(); rtLightningPrev.Dispose(); tLightning.Dispose(); seLightning.Dispose(); seThunder.Dispose(); }
public void ReleaseEffect() { if (--mInstanceCount > 0) { return; } mSound?.Dispose(); mSound = null; }
public void Dispose() { if (Sound != null) { if (dispose_sound) { Sound.Dispose(); } } }
public override void Dispose() { base.Dispose(); foreach (SoundEffectInstance sf in freeObject) { sf.Dispose(); } freeObject.Clear(); sound.Dispose(); }
public void Dispose() { if (_isDisposed) { return; } _soundEffectInstance.Stop(); _soundEffectInstance.Dispose(); _soundEffect.Dispose(); _isDisposed = true; }
public void dispose() { for (int i = 0; i < _thisInstancesId.Count; i++) { if (_thisInstancesId[i] != -1) { instances[(int)_thisInstancesId[i]].Dispose(); } } _sound.Dispose(); }
/// <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(); }
protected override void DisposeManagedResources() { if (effect != null) { effect.Dispose(); } if (sfxInstance != null) { sfxInstance.Dispose(); } }
public void Dispose() { if (IsDisposed) { throw new ObjectDisposedException(this.ToString()); } IsDisposed = true; if (soundFile != null) { soundFile.Dispose(); } }
public void Kill() { if (fscMode) { HITVM.Get().StopFSC(fsc); } else { inst.Stop(); inst.Dispose(); sfx.Dispose(); } }