예제 #1
0
        public override void Dispose()
        {
            moto.dispose();

            foreach (TgcMesh caja in cajas)
            {
                caja.dispose();
            }

            controladorIA.disposeOponentes();

            skyBoxTron.dispose();

            texto.Dispose();
            textoModoDios.Dispose();

            cajaConLuz.dispose();
            efectoLuz.Dispose();

            gestorPowerUps.dispose();

            pisoPlane.dispose();
            piso.dispose();

            mp3Player.closeFile();
        }
        public override void Dispose()
        {
            suelo.dispose();

            //Al hacer dispose del original, se hace dispose automáticamente de todas las instancias
            palmeraOriginal.dispose();
        }
예제 #3
0
        public override void init()
        {
            Microsoft.DirectX.Direct3D.Device d3dDevice = GuiController.Instance.D3dDevice;

            //Cuerpo principal que se controla con el teclado
            box = TgcBox.fromSize(new Vector3(0, 10, 0), new Vector3(10, 10, 10), Color.Blue);

            //triangulo
            triangle    = new CustomVertex.PositionColored[3];
            triangle[0] = new CustomVertex.PositionColored(-100, 0, 0, Color.Red.ToArgb());
            triangle[1] = new CustomVertex.PositionColored(0, 0, 50, Color.Green.ToArgb());
            triangle[2] = new CustomVertex.PositionColored(0, 100, 0, Color.Blue.ToArgb());
            triagleAABB = TgcBoundingBox.computeFromPoints(new Vector3[] { triangle[0].Position, triangle[1].Position, triangle[2].Position });

            //box2
            box2 = TgcBox.fromSize(new Vector3(-50, 10, -20), new Vector3(15, 15, 15), Color.Violet);

            //sphere
            sphere = new TgcBoundingSphere(new Vector3(30, 20, -20), 15);

            //OBB: computar OBB a partir del AABB del mesh.
            TgcSceneLoader loader  = new TgcSceneLoader();
            TgcMesh        meshObb = loader.loadSceneFromFile(GuiController.Instance.ExamplesMediaDir + "MeshCreator\\Meshes\\Vehiculos\\StarWars-ATST\\StarWars-ATST-TgcScene.xml").Meshes[0];

            obb = TgcObb.computeFromAABB(meshObb.BoundingBox);
            meshObb.dispose();
            obb.move(new Vector3(100, 0, 30));
            obb.setRotation(new Vector3(0, FastMath.PI / 4, 0));


            //Configurar camara en Tercer Persona
            GuiController.Instance.ThirdPersonCamera.Enable = true;
            GuiController.Instance.ThirdPersonCamera.setCamera(box.Position, 30, -75);
        }
 public override void Dispose()
 {
     if (Mesh.Enabled)
     {
         Mesh.dispose();
     }
 }
예제 #5
0
        public void Dispose()
        {
            // Se libera el Terreno
            terrain.dispose();
            mar.dispose();
            laguna.dispose();
            fogata.dispose();
            emisorFuego.dispose();


            // Se liberan los elementos de la escena
            foreach (var mesh in SceneMeshes)
            {
                mesh.dispose();
            }

            foreach (var dest in Destroyables)
            {
                dest.Dispose();
            }

            // Se libera Lista de Mesh
            SceneMeshes.Clear();

            //Liberar recursos del SkyBox
            skyBoxGame[env.horaDelDia].dispose();
        }
예제 #6
0
        public override void updateBoundingBox()
        {
            TgcMesh m = mesh.toMesh(this.Name);

            this.mesh.BoundingBox.setExtremes(m.BoundingBox.PMin, m.BoundingBox.PMax);
            m.dispose();
        }
        public void dispose()
        {
            //suelo.Enabled = true;
            suelo.dispose();
            //calle.dispose();
            //Al hacer dispose del original, se hace dispose automaticamente de todas las instancias
            edificio.dispose();

            /*  auto.dispose();
             * hummer.dispose();
             * camion.dispose();
             * buggy.dispose();
             * patrullero.dispose();
             */
            /*  foreach (var vehiculo in vehiculos)
             * {
             *    vehiculo.getMesh().dispose();
             * }*/


            //Liberar recursos del SkyBox
            skyBox.dispose();
            foreach (TgcMesh mesh in this.getAllMeshes())
            {
                mesh.dispose();
            }

            disposeListas();
        }
 public override void Dispose()
 {
     colliderCylinder.dispose();
     colliderCylinderFixedY.dispose();
     collisionableSphere.dispose();
     collisionableMeshAABB.dispose();
     collisionableCylinder.dispose();
 }
예제 #9
0
 public override void dispose()
 {
     meshAuxiliarParaSonido.dispose();
     walkSound.dispose();
     runSound.dispose();
     breathSound.dispose();
     hitSound.dispose();
 }
예제 #10
0
        public override void Dispose()
        {
            //Liberar memoria del modelo 3D
            mesh.dispose();

            //Liberar memoria de toda la escena
            scene.disposeAll();
        }
예제 #11
0
 public override void Dispose()
 {
     skyBox.dispose();
     terreno.dispose();
     foreach (var mesh in objetosIsla)
     {
         mesh.dispose();
     }
 }
예제 #12
0
 public override void close()
 {
     mesh.dispose();
     effect.Dispose();
     g_pRenderTarget.Dispose();
     g_pBlurFactor.Dispose();
     g_pVBV3D.Dispose();
     g_pDepthStencil.Dispose();
 }
 public override void Dispose()
 {
     mesh.dispose();
     box2.dispose();
     boundingSphere.dispose();
     meshObb.dispose();
     obb.dispose();
     triangle = null;
 }
예제 #14
0
 public override void close()
 {
     //universo.disposeAll();
     nave.dispose();
     for (int i = 0; i < 10; i++)
     {
         planetas[i].dispose();
     }
 }
예제 #15
0
 public override void close()
 {
     skyBox.dispose();
     terreno.dispose();
     foreach (TgcMesh mesh in objetosIsla)
     {
         mesh.dispose();
     }
 }
예제 #16
0
 public override void close()
 {
     g_pRenderTarget.Dispose();
     g_pDepthStencil.Dispose();
     g_pVBV3D.Dispose();
     g_pVel1.Dispose();
     g_pVel2.Dispose();
     arbol.dispose();
     skyBox.dispose();
 }
예제 #17
0
 public override void close()
 {
     sol.dispose();
     nave.Modelo.dispose();
     effect.Dispose();
     screenQuadVB.Dispose();
     renderTarget2D.Dispose();
     NaveEnemiga1.Modelo.dispose();
     Universo.disposeAll();
 }
예제 #18
0
        public override void close()
        {
            mesh.dispose();

            g_pRenderTarget.Dispose();
            g_pDepthStencil.Dispose();
            g_pVBV3D.Dispose();
            g_pVel1.Dispose();
            g_pVel2.Dispose();
        }
예제 #19
0
        internal void close()
        {
            ModeloRobot.dispose();
            ModeloNave.dispose();
            ModeloProyectil.dispose();

            windShader.Dispose();
            envMap.Dispose();
            skeletalEnvMap.Dispose();
            cubeMap.Dispose();

            Vegetation.disposeAll();
            Arbustos.disposeAll();
            terrain.dispose();
            player1.dispose();

            skyBox.dispose();

            foreach (Enemy enemy in enemies)
            {
                enemy.dispose();
            }
            enemies.Clear();

            foreach (Proyectil proy in proyectiles)
            {
                proy.dispose();
            }
            proyectiles.Clear();

            foreach (Barril barril in barriles)
            {
                barril.dispose();
            }
            barriles.Clear();
            Barriles.disposeAll();

            foreach (Pasto pasto in pastos)
            {
                pasto.dispose();
            }

            foreach (TgcMesh tesoro in tesoros)
            {
                tesoro.dispose();
            }
            tesoros.Clear();
            Tesoros.disposeAll();

            foreach (TgcSprite pointer in pointers)
            {
                pointer.dispose();
            }
            pointers.Clear();
        }
예제 #20
0
 public override void dispose()
 {
     mesh.dispose();
     mesh             = null;
     originalUVCoords = null;
     if (editablePoly != null)
     {
         editablePoly.dispose();
         editablePoly = null;
     }
 }
예제 #21
0
 public override void close()
 {
     mesh.dispose();
     effect.Dispose();
     g_pBaseTexture.Dispose();
     g_pBaseTexture2.Dispose();
     g_pBaseTexture3.Dispose();
     g_pHeightmap.Dispose();
     g_pHeightmap2.Dispose();
     g_pHeightmap3.Dispose();
 }
 /// <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()
 {
     //Ciudad.dispose();
     controladorDeVehiculos.dispose();
     boxComenzar.dispose();
     boxPersonaje.dispose();
     boxSalir.dispose();
     personaje1.dispose();
     personaje2.dispose();
     personaje3.dispose();
 }
예제 #23
0
파일: Player.cs 프로젝트: javs/Snipers-CEGA
 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();
 }
예제 #24
0
        public override void Dispose()
        {
            piso.dispose();
            foreach (var obstaculo in obstaculos)
            {
                obstaculo.dispose();
            }
            personaje.dispose();

            foreach (var sound in sonidos)
            {
                sound.dispose();
            }
        }
예제 #25
0
        public override void close()
        {
            piso.dispose();
            foreach (TgcBox obstaculo in obstaculos)
            {
                obstaculo.dispose();
            }
            personaje.dispose();

            foreach (Tgc3dSound sound in sonidos)
            {
                sound.dispose();
            }
        }
 public override void close()
 {
     mesh.dispose();
     foreach (TgcTriangle t in triangles)
     {
         t.dispose();
     }
     foreach (TgcArrow a in normals)
     {
         a.dispose();
     }
     foreach (TgcQuad p in planes)
     {
         p.dispose();
     }
 }
예제 #27
0
        public override void Dispose()
        {
            //El ejemplo fuerza al dispose por eso no se debe llamar devuelta.
            if (time != -1)
            {
                foreach (var m in meshes)
                {
                    m.dispose();
                }
                meshes.Clear();

                scene1.disposeAll();

                boxMesh.dispose();
            }
        }
예제 #28
0
        public override void Dispose()
        {
            circuito.dispose();
            car.dispose();
            effect.Dispose();
            terrain.dispose();
            skyBox.dispose();

            g_pRenderTarget.Dispose();
            g_pRenderTarget2.Dispose();
            g_pRenderTarget3.Dispose();
            g_pRenderTarget4.Dispose();
            g_pRenderTarget5.Dispose();
            g_pDepthStencil.Dispose();
            g_pVBV3D.Dispose();
        }
 public override void Dispose()
 {
     mesh.dispose();
     foreach (var t in triangles)
     {
         t.dispose();
     }
     foreach (var a in normals)
     {
         a.dispose();
     }
     foreach (var p in planes)
     {
         p.dispose();
     }
 }
예제 #30
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 close()
 {
     try
     {
         pOldRT.Dispose();
         zBufferTexture.Dispose();
         skyBox2.dispose();
         nube.dispose();
         foreach (TgcMesh mesh in meshes)
         {
             mesh.dispose();
         }
     }
     catch (Exception e)
     {
     }
 }