public void playSound(string dir)
 {
     //reproducir un sonido
     sound.dispose();
     sound.loadSound(dir);
     sound.play();
 }
Exemple #2
0
 public override void LoadValues()
 {
     _ChargeSound.dispose();
     _ChargeSound      = Game.Current.GetSound("CannonCharge.wav", 0);
     _Base.Rotation    = _BaseRotationSaved;
     RotationTarget    = _RotationTargetSaved;
     _IsRotationTarget = _IsRotationTargetSaved;
     base.LoadValues();
     OnScaleChanged();
     _Load = null;
     _Smoke.Stop();
 }
 public void playSound(TgcStaticSound sound, string dir, bool loop)
 {
     //reproducir un sonido
     sound.dispose();
     sound.loadSound(dir, PLAYER_VOLUME);
     sound.play(loop);
 }
 public void Dispose()
 {
     Tribuna.dispose();
     Musica.dispose();
     Aplausos.dispose();
     GameOver.dispose();
 }
 public void Dispose()
 {
     Entities.Remove(this);
     mesh.Dispose();
     agarrarEfecto.dispose();
     DisposeEntity();
 }
 public static void Dispose()
 {
     Start.Dispose();
     Instruccion.Dispose();
     Exit.Dispose();
     GameOver.Dispose();
     GameOverSubtitle.Dispose();
     YouWin.Dispose();
     YouWinSubtitle.Dispose();
     Logo.Dispose();
     OverlayInv.Dispose();
     OverlayCraft.Dispose();
     HealthBar.Dispose();
     OxygenBar.Dispose();
     sonido.dispose();
     foreach (var ins in instrucciones)
     {
         ins.Dispose();
     }
     foreach (var item in InventoryItems)
     {
         item.Dispose();
     }
     foreach (var item in CraftingItems)
     {
         item.Dispose();
     }
 }
 public override void dispose()
 {
     meshAuxiliarParaSonido.dispose();
     walkSound.dispose();
     runSound.dispose();
     breathSound.dispose();
     hitSound.dispose();
 }
Exemple #8
0
 public void dispose()
 {
     respiro.dispose();
     respiroPersecucion.dispose();
     monstruo.dispose();
     fondoSonido.dispose();
     respiracionCadaTanto.dispose();
 }
 public void Dispose()
 {
     Tribuna.dispose();
     Musica.dispose();
     Aplausos.dispose();
     GameOver.dispose();
     Aceleracion.dispose();
     Frenada.dispose();
     Choque.dispose();
 }
Exemple #10
0
        /// <summary>
        ///     Cargar un nuevo WAV si hubo una variacion
        /// </summary>
        private void loadSound(string filePath)
        {
            if (currentFile == null || currentFile != filePath)
            {
                currentFile = filePath;

                //Borrar sonido anterior
                if (sound != null)
                {
                    sound.dispose();
                    sound = null;
                }

                //Cargar sonido
                sound = new TgcStaticSound();
                sound.loadSound(currentFile, DirectSound.DsDevice);

                currentSoundText.Text = "Playing: " + new FileInfo(currentFile).Name;
            }
        }
        public void PlaySound(string fileName)
        {
            if (currentSoundFile == null || currentSoundFile != fileName)
            {
                currentSoundFile = Game.Default.MediaDirectory + Game.Default.FXDirectory + fileName;

                //Borrar sonido anterior
                if (sound != null)
                {
                    sound.dispose();
                    sound = null;
                }

                //Cargar sonido
                sound = new TgcStaticSound();

                sound.loadSound(currentSoundFile, device);

                sound.play();
            }
        }
 public void Dispose()
 {
     if (_WinSign.Texture != null)
     {
         _WinSign.Texture.dispose();
     }
     _WinSound.dispose();
     _Sound.dispose();
     foreach (var item in _Items)
     {
         item.Dispose();
     }
 }
Exemple #13
0
 public void Dispose()
 {
     rifle.dispose();
     sound_Zoom.dispose();
     scope_stencil.dispose();
     camera.Dispose();
     sound_Disparo.dispose();
     sound_DryFire.dispose();
     sound_Hit.dispose();
     sound_Die.dispose();
     mira.dispose();
     tvidas.dispose();
     tammo.dispose();
 }
Exemple #14
0
        /// <summary>
        ///     Se llama cuando termina la ejecución del ejemplo.
        ///     Hacer Dispose() de todos los objetos creados.
        ///     Es muy importante liberar los recursos, sobretodo los gráficos ya que quedan bloqueados en el device de video.
        /// </summary>
        public override void Dispose()
        {
            disposing = true;
            shark.Dispose();
            efectoDesaparecer.Dispose();
            sonidoUnderwater.dispose();
            Player.Dispose();
            oceano.Dispose();
            heightmap.Dispose();

            foreach (var pez in peces)
            {
                pez.Dispose();
            }
            foreach (var coral in corales)
            {
                coral.Dispose();
            }
            foreach (var metal in metales)
            {
                metal.Dispose();
            }
            foreach (var piedra in piedras)
            {
                piedra.Dispose();
            }

            nave.Dispose();

            interiorNave.Dispose();
            mesaNave.Dispose();
            sogaInterior.Dispose();
            lamparaNave.Dispose();
            sillaInterior.Dispose();
            timonInterior.Dispose();
            Particulas.Dispose();
            Oceano.Dispose();
            Hud.Dispose();
            maskTexture.dispose();
            perlinTexture.dispose();
            arma.Dispose();
            effect.Dispose();
            renderTarget.Dispose();
            fullScreenQuad.Dispose();
            depthStencil.Dispose();
            coralesBrillantes.Dispose();
            FBVerticalBloom.Dispose();
            FBHorizontalBool.Dispose();
        }
Exemple #15
0
        private void loadSound(string filePath)
        {
            if (currentFile == null || currentFile != filePath)
            {
                currentFile = filePath;

                //Borrar sonido anterior
                if (sound != null)
                {
                    sound.dispose();
                    sound = null;
                }

                //Cargar sonido
                sound = new TgcStaticSound();
                sound.loadSound(currentFile);
            }
        }
Exemple #16
0
        private void cargarSonido(string filePath)
        {
            filePath = MediaDir + filePath;
            if (currentFile == null || currentFile != filePath)
            {
                currentFile = filePath;

                //Borrar sonido anterior
                if (sound != null)
                {
                    sound.dispose();
                    sound = null;
                }

                //Cargar sonido
                sound = new TgcStaticSound();
                sound.loadSound(currentFile, DirectSound.DsDevice);
            }
        }
        public void close()
        {
            specialKillText.dispose();
            scoreText.dispose();
            captureText.dispose();
            normalScope.dispose();
            zoomedScope.dispose();
            ambient.dispose();


            HudFront.dispose();
            cross.dispose();
            healthSprite.dispose();
            hudWeapon.dispose();
            scoreSprite.dispose();
            mapBaseSprite.dispose();
            playerPointerSprite.dispose();
            highScoreSprite.dispose();
            sound.dispose();
            launcherTexture.dispose();
            sniperTexture.dispose();
        }
Exemple #18
0
 public void dispose()
 {
     modeloPuerta.dispose();
     soundPuerta.dispose();
 }
Exemple #19
0
 protected override void DisposeEntity()
 {
     sound.dispose();
     soundWin.dispose();
 }
 public void Dispose()
 {
     mesh.Dispose();
     colision.dispose();
     walking.dispose();
 }
 public void dispose()
 {
     SonidoCaminar.dispose();
 }
 public void dispose()
 {
     removeFloatingVegetation();
     label.dispose();
     sound.dispose();
 }
Exemple #23
0
 public static void Stop(TgcStaticSound sound)
 {
     sound.dispose();
     SoundsPlaying.Remove(sound);
 }
Exemple #24
0
 /// <summary>
 ///  Liberar recursos
 /// </summary>
 public static void Dispose()
 {
     Mp3Player.closeFile();
     RuidoAmbienteOceano.dispose();
     RuidoAmbienteSubmarino.dispose();
 }
Exemple #25
0
 public void dispose()
 {
     bBrush.Dispose();
     sound.dispose();
     text.Dispose();
 }
Exemple #26
0
 public void dispose()
 {
     sound.dispose();
     area.dispose();
 }
Exemple #27
0
 /// <summary>
 ///     Método que se llama cuando termina la ejecución del ejemplo.
 ///     Hacer dispose() de todos los objetos creados.
 /// </summary>
 public override void Dispose()
 {
     piso.dispose();
     personaje.Dispose();
     terreno.dispose();
     skyBox.dispose();
     foreach (var elemento in elementos)
     {
         elemento.destruir();
     }
     informativo.Dispose();
     estadoJuego.Dispose();
     oveja.destruir();
     gallo.destruir();
     mochila.Dispose();
     cajon.Dispose();
     mochilaReglon1.Dispose();
     cajonReglon1.Dispose();
     alimentacion.Dispose();
     salud.Dispose();
     hidratacion.Dispose();
     cansancio.Dispose();
     mensajeObjetivo1.Dispose();
     objetivosIcono.Dispose();
     alimentacionIcono.Dispose();
     saludIcono.Dispose();
     hidratacionIcono.Dispose();
     cansancioIcono.Dispose();
     ayudaReglon1.Dispose();
     ayuda.Dispose();
     ayudaReglon2.Dispose();
     dia.GetSol().Mesh.dispose();
     temperaturaDia.Dispose();
     horaDia.Dispose();
     temperaturaDiaIcono.Dispose();
     horaDiaIcono.Dispose();
     temperaturaPersonaje.Dispose();
     temperaturaPersonajeIcono.Dispose();
     estadoDiaSolIcono.Dispose();
     estadoDiaLunaIcono.Dispose();
     miniMapa.Dispose();
     referenciaMiniMapa.Dispose();
     linea.Dispose();
     efectoLluvia.Dispose();
     screenQuadVB.Dispose();
     renderTarget2D.Dispose();
     depthStencil.Dispose();
     if (pOldStencil != null)
     {
         pOldStencil.Dispose();
     }
     if (pOldRT != null)
     {
         pOldRT.Dispose();
     }
     estadoDiaLluviaIcono.Dispose();
     sonidoGolpe.dispose();
     sonidoGolpePatada.dispose();
     sonidoLluvia.dispose();
     sonidoGrillos.dispose();
     sonidoGrillos2.dispose();
 }
 public void Dispose()
 {
     sonido.dispose();
 }