Ejemplo n.º 1
0
        public TgcStaticSound GetSound(String soundFile, int volume)
        {
            var sound = new TgcStaticSound();

            sound.loadSound(_SoundFolder + soundFile, volume);
            return(sound);
        }
Ejemplo n.º 2
0
 public void playSound(TgcStaticSound sound, string dir, bool loop)
 {
     //reproducir un sonido
     sound.dispose();
     sound.loadSound(dir, PLAYER_VOLUME);
     sound.play(loop);
 }
        public GameSound(Device directSound)
        {
            #region inicializarSonidos
            disparo = new TgcStaticSound();
            string filePath = GameModel.mediaDir + "sonidos\\plop.wav";
            disparo.loadSound(filePath, directSound);

            filePath  = GameModel.mediaDir + "sonidos\\explosion.wav";
            explosion = new TgcStaticSound();
            explosion.loadSound(filePath, directSound);

            filePath   = GameModel.mediaDir + "sonidos\\explosion2.wav";
            explosion1 = new TgcStaticSound();
            explosion1.loadSound(filePath, directSound);

            zombie   = new TgcStaticSound();
            filePath = GameModel.mediaDir + "sonidos\\zombie2.wav";
            zombie.loadSound(filePath, directSound);

            helicoptero = new TgcStaticSound();
            filePath    = GameModel.mediaDir + "sonidos\\helicoptero.wav";
            helicoptero.loadSound(filePath, directSound);

            musica   = new TgcStaticSound();
            filePath = GameModel.mediaDir + "sonidos\\musica.wav";
            musica.loadSound(filePath, directSound);
            musica.play(true);

            piano    = new TgcStaticSound();
            filePath = GameModel.mediaDir + "sonidos\\piano.wav";
            piano.loadSound(filePath, directSound);
            // piano.play(true);
            #endregion
        }
Ejemplo n.º 4
0
        public Sonidos(string mediaDir, Microsoft.DirectX.DirectSound.Device sonidoDevice)
        {
            MediaDir     = mediaDir;
            SonidoDevice = sonidoDevice;

            // Sonidos
            Musica = new TgcStaticSound();
            Musica.loadSound(MediaDir + "Musica\\Running90s.wav", -1800, SonidoDevice);

            Tribuna = new TgcStaticSound();
            Tribuna.loadSound(MediaDir + "Musica\\Tribuna.wav", -400, SonidoDevice);

            Aplausos = new TgcStaticSound();
            Aplausos.loadSound(MediaDir + "Musica\\Aplausos.wav", -100, SonidoDevice);

            GameOver = new TgcStaticSound();
            GameOver.loadSound(MediaDir + "Musica\\GameOver.wav", -100, SonidoDevice);

            Aceleracion = new TgcStaticSound();
            Aceleracion.loadSound(MediaDir + "Musica\\Motor2.wav", -1700, SonidoDevice);

            Frenada = new TgcStaticSound();
            Frenada.loadSound(MediaDir + "Musica\\Frenada.wav", -2000, SonidoDevice);

            Choque = new TgcStaticSound();
            Choque.loadSound(MediaDir + "Musica\\Choque1.wav", -2000, SonidoDevice);

            //Motor = new Tgc3dSound(MediaDir + "Musica\\Motor2.wav", Auto.Mayas[0].Position, SonidoDevice);
            //Motor.MinDistance = 80f;
        }
Ejemplo n.º 5
0
        public Sonidos(string mediaDir, Microsoft.DirectX.DirectSound.Device sonidoDevice)
        {
            MediaDir     = mediaDir;
            SonidoDevice = sonidoDevice;
            // Sonidos
            int volumen1   = -1800; // RANGO DEL 0 AL -10000 (Silenciado al -10000)
            var pathMusica = MediaDir + "Musica\\Running90s.wav";

            Musica = new TgcStaticSound();
            Musica.loadSound(pathMusica, volumen1, SonidoDevice);

            int volumen2    = -400;
            var pathTribuna = MediaDir + "Musica\\Tribuna.wav";

            Tribuna = new TgcStaticSound();
            Tribuna.loadSound(pathTribuna, volumen2, SonidoDevice);

            var pathAplausos = MediaDir + "Musica\\Aplausos.wav";

            Aplausos = new TgcStaticSound();
            Aplausos.loadSound(pathTribuna, -100, SonidoDevice);

            var pathGameOver = MediaDir + "Musica\\GameOver.wav";

            GameOver = new TgcStaticSound();
            GameOver.loadSound(pathGameOver, -100, SonidoDevice);
        }
Ejemplo n.º 6
0
        public VideoScene(string directory, string format, float fps, int total_frames)
        {
            FPS         = fps;
            TotalFrames = total_frames;

            current_frame = 0;
            time          = 0.0f;

            frames = new TgcTexture[TotalFrames];

            for (int i = 1; i <= TotalFrames; i++)
            {
                frames[i - 1] = TgcTexture.createTexture(directory + @"\" + i.ToString("D4") + "." + format);
            }

            sprite         = new TgcSprite();
            sprite.Texture = frames[current_frame];

            Size screenSize  = GuiController.Instance.Panel3d.Size;
            Size textureSize = sprite.Texture.Size;

            sprite.Scaling = new Vector2(
                (float)screenSize.Width / textureSize.Width,
                (float)screenSize.Height / textureSize.Height);

            sprite.Position = new Vector2(
                FastMath.Max(screenSize.Width / 2 - textureSize.Width * sprite.Scaling.X / 2, 0),
                FastMath.Max(screenSize.Height / 2 - textureSize.Height * sprite.Scaling.Y / 2, 0));

            sound = new TgcStaticSound();
            sound.loadSound(directory + @"\sound.wav");

            Playing = false;
        }
        public BlackHole()
        {
            var mesh = Game.Current.NewMesh("BallTextured");

            Add(new MeshStaticPart(mesh)
            {
                Texture = Game.Current.GetMaterial("BlackHole.jpg")
            });
            Add(new SphereCollider(mesh));
            _SoundEffect   = Game.Current.GetSound("BlackHole.wav", EffectVolume);
            Add(_StarStorm = new TranslatedParticlePart()
            {
                Translation = new Vector3(0, 0, -4),
                Animation   = new AnimatedQuad()
                {
                    Texture      = Game.Current.GetParticle("thunders.png"),
                    FrameSize    = new Size(256, 256),
                    Size         = new Vector2(25, 25),
                    FirstFrame   = 0,
                    CurrentFrame = 0,
                    FrameRate    = 15,
                    TotalFrames  = 16,
                }
            });
        }
Ejemplo n.º 8
0
 public TriggerSound(Vector3 aPosition, string path, Device device)
 {
     area          = new TgcBox();
     area.Size     = new Vector3(60, 60, 60);
     area.Position = aPosition;
     sound         = new TgcStaticSound();
     sound.loadSound(path, device);
 }
Ejemplo n.º 9
0
        private void crearSonido()
        {
            //Instanciar sonido del ambiente Oceano
            sonidoAmbienteOceano = new TgcStaticSound();
            string sonidoPath = Utiles.getDirSonido("Oceano.wav");

            sonidoAmbienteOceano.loadSound(sonidoPath);
        }
Ejemplo n.º 10
0
        public static void Play(string soundPath)
        {
            var temp = new TgcStaticSound();

            temp.loadSound(soundPath, DirectSound.DsDevice);

            Play(temp);
        }
Ejemplo n.º 11
0
 public StaticSound(string path, Device DsDevice, bool loop)
 {
     this.path  = path;
     this.sound = new TgcStaticSound();
     this.sound.loadSound(path, 0, DsDevice);
     this.loop     = loop;
     this.DsDevice = DsDevice;
 }
Ejemplo n.º 12
0
 public Shark(TgcMesh mesh) : base(mesh, meshLookDir)
 {
     this.vida = 500;
     necesitaArmaParaInteractuar = true;
     agarrarEfecto = new TgcStaticSound();
     agarrarEfecto.loadSound(SoundsManager.Instance().mediaDir + "Sounds\\stab.wav", SoundsManager.Instance().sound);
     soundWin = new TgcStaticSound();
     soundWin.loadSound(SoundsManager.Instance().mediaDir + "Sounds\\win.wav", SoundsManager.Instance().sound);
 }
 protected Player()
 {
     walking = new TgcStaticSound();
     walking.loadSound(SoundsManager.Instance().mediaDir + "Sounds\\walking.wav", SoundsManager.Instance().sound);
     colision = new TgcStaticSound();
     colision.loadSound(SoundsManager.Instance().mediaDir + "Sounds\\colision.wav", SoundsManager.Instance().sound);
     gameOver = new TgcStaticSound();
     gameOver.loadSound(SoundsManager.Instance().mediaDir + "Sounds\\gameover.wav", SoundsManager.Instance().sound);
 }
 public Entity(TgcMesh mesh, TGCVector3 defaultLookDir)
 {
     if (!necesitaArmaParaInteractuar)
     {
         agarrarEfecto = new TgcStaticSound();
         agarrarEfecto.loadSound(SoundsManager.Instance().mediaDir + "Sounds\\grab.wav", SoundsManager.Instance().sound);
     }
     this.mesh           = mesh;
     this.defaultLookDir = defaultLookDir;
 }
Ejemplo n.º 15
0
        public TerrainBrush()
        {
            SoundEnabled = true;
            text         = new TgcText2d();
            text.Align   = TgcText2d.TextAlign.RIGHT;
            text.changeFont(new System.Drawing.Font("Arial", 12, FontStyle.Bold));

            bBrush = TgcBox.fromSize(new Vector3(10, 100, 10));
            sound  = new TgcStaticSound();
            sound.loadSound(GuiController.Instance.ExamplesMediaDir + "Sound\\tierra.wav");
        }
Ejemplo n.º 16
0
        public void loadMP3()
        {
            //GuiController.Instance.Mp3Player.closeFile();
            //GuiController.Instance.Mp3Player.FileName = GuiController.Instance.AlumnoEjemplosMediaDir + "Kamikaze3D\\Explosion\\fx.mp3";
            //GuiController.Instance.Mp3Player.play(false);

            TgcStaticSound sonidoBomba = new TgcStaticSound();

            sonidoBomba.loadSound(GuiController.Instance.AlumnoEjemplosMediaDir + "Kamikaze3D\\Explosion\\fx.wav");
            sonidoBomba.play();
        }
Ejemplo n.º 17
0
        private void _Shoot()
        {
            _ChargeSound.dispose();
            _ChargeSound = Game.Current.GetSound("CannonCharge.wav", 0);
            var d = _LoadColider.Orientation[1];

            _Load.Position += d * (_LoadColiderExtents.Y + 1);
            _Load.Velocity  = d * _ForceReal;
            _Load           = null;
            _Smoke.Start();
        }
Ejemplo n.º 18
0
        public TerrainBrush(TgcTerrainEditor editor)
        {
            SoundEnabled = true;
            text         = new TgcText2D();
            text.Align   = TgcText2D.TextAlign.RIGHT;
            text.changeFont(new Font("Arial", 12, FontStyle.Bold));

            bBrush = TGCBox.fromSize(new TGCVector3(10, 100, 10));
            sound  = new TgcStaticSound();
            sound.loadSound(editor.MediaDir + "Sound\\tierra.wav", editor.DirectSound.DsDevice);
        }
Ejemplo n.º 19
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();
 }
Ejemplo n.º 20
0
        public EnemigoAnimacion(Vector3 cercania, Vector3 dimensionesCaja)
        {
            string pathSonido = alumnoMediaFolder + "CucarachaJugosita\\Media\\Juego felipe sonido ambiente terror.wav";

            sonidoPreSusto = new TgcStaticSound();
            sonidoPreSusto.loadSound(pathSonido);
            this.cercania    = cercania;
            animada          = false;
            activarAnimacion = false;
            //Paths para archivo XML de la malla
            pathMesh = alumnoMediaFolder + "CucarachaJugosita\\Media\\SkeletalAnimations\\Robot\\Robot-TgcSkeletalMesh.xml";

            //Path para carpeta de texturas de la malla
            mediaPath = alumnoMediaFolder + "CucarachaJugosita\\Media\\SkeletalAnimations\\Robot\\";

            //Lista de animaciones disponibles
            animationList = new string[] {
                "Parado",
                "Caminando",
                "Correr",
                "PasoDerecho",
                "PasoIzquierdo",
                "Empujar",
                "Patear",
                "Pegar",
                "Arrojar",
            };

            //Crear rutas con cada animacion
            animationsPath = new string[animationList.Length];
            for (int i = 0; i < animationList.Length; i++)
            {
                animationsPath[i] = mediaPath + animationList[i] + "-TgcSkeletalAnim.xml";
            }

            //Cargar mesh y animaciones
            TgcSkeletalLoader loader2 = new TgcSkeletalLoader();

            mesh = loader2.loadMeshAndAnimationsFromFile(pathMesh, mediaPath, animationsPath);
            //mesh.Position = new Vector3(105, 5.06f, 660);
            mesh.Scale = new Vector3(0.5f, 0.5f, 0.5f);
            //Crear esqueleto a modo Debug
            mesh.buildSkletonMesh();
            //Elegir animacion Caminando
            // mesh.BoundingBox.move(new Vector3(15,0,-170));
            //mesh.BoundingBox.scaleTranslate(mesh.BoundingBox.Position, new Vector3(4f,0.8f,4f)); // este sera el rango de vision
            bounding = new TgcBox();
            bounding = TgcBox.fromSize(mesh.Position, new Vector3(100f, 100f, 300f));
            bounding.move(new Vector3(15, 0, -170));
            box          = new TgcBox();
            box.Position = cercania;
            box.Size     = dimensionesCaja;
        }
Ejemplo n.º 21
0
        public void die()
        {
            // GuiController.Instance.Mp3Player.closeFile();
            // GuiController.Instance.Mp3Player.FileName = GuiController.Instance.AlumnoEjemplosMediaDir + "Kamikaze3D\\AK47\\death.mp3";
            // GuiController.Instance.Mp3Player.play(false);

            TgcStaticSound morir = new TgcStaticSound();

            morir.loadSound(GuiController.Instance.AlumnoEjemplosMediaDir + "Kamikaze3D\\AK47\\death.wav");
            morir.play();

            this.dead = true;
        }
Ejemplo n.º 22
0
        public VegetationPicker()
        {
            label       = new TgcText2d();
            label.Color = Color.Yellow;
            label.Align = TgcText2d.TextAlign.LEFT;
            font        = new System.Drawing.Font("Arial", 12, FontStyle.Bold);
            label.changeFont(font);

            Rotation     = RotationAxis.Y;
            SoundEnabled = true;
            sound        = new TgcStaticSound();
            sound.loadSound(GuiController.Instance.ExamplesMediaDir + "Sound\\pisada arena dcha.wav", -2000);
        }
Ejemplo n.º 23
0
        public VegetationPicker(TgcTerrainEditor editor)
        {
            label       = new TgcText2D();
            label.Color = Color.Yellow;
            label.Align = TgcText2D.TextAlign.LEFT;
            font        = new Font("Arial", 12, FontStyle.Bold);
            label.changeFont(font);

            Rotation     = RotationAxis.Y;
            SoundEnabled = true;
            sound        = new TgcStaticSound();
            sound.loadSound(editor.MediaDir + "Sound\\pisada arena dcha.wav", -2000, editor.DirectSound.DsDevice);
        }
Ejemplo n.º 24
0
        public override void Init()
        {
            weaponOscilation = 0;
            FIRE_DELAY       = 0;
            MAX_DELAY        = 2;
            weaponSound      = new TgcStaticSound();
            muzzle           = new MuzzleFlash();
            muzzle.crearMuzzle();

            //Permitir matrices custom
            mesh.AutoTransformEnable = false;

            currentShader = GuiController.Instance.Shaders.TgcMeshPointLightShader;
        }
Ejemplo n.º 25
0
        public override void Init()
        {
            vida       = 100;
            sprintTime = 0;
            tiredTime  = 0;
            running    = false;

            hitSound    = new TgcStaticSound();
            breathSound = new TgcStaticSound();
            walkSound   = new TgcStaticSound();
            runSound    = new TgcStaticSound();

            sniper = new Sniper();
            sniper.Init();
            launcher = new RocketLauncher();
            launcher.Init();

            weapon = sniper;
            weapon.muzzle.scale = weapon.scaleMuzzle;

            //Mesh auxiliar para el sonido
            TgcSceneLoader loader = new TgcSceneLoader();
            TgcScene       scene2 = loader.loadSceneFromFile(GuiController.Instance.AlumnoEjemplosMediaDir + "Los_Borbotones\\Meshes\\svd\\svd-TgcScene.xml");

            meshAuxiliarParaSonido = scene2.Meshes[0];

            //hago que los 3dSound sigan al arma
            GuiController.Instance.DirectSound.ListenerTracking = meshAuxiliarParaSonido;
            ///////////////CONFIGURAR CAMARA PRIMERA PERSONA CUSTOM//////////////////
            //Camara en primera persona, tipo videojuego FPS
            //Solo puede haber una camara habilitada a la vez. Al habilitar la camara FPS se deshabilita la camara rotacional
            //Por default la camara FPS viene desactivada
            GuiController.Instance.RotCamera.Enable = false;
            CustomFpsCamera.Instance.Enable         = true;
            GuiController.Instance.CurrentCamera    = CustomFpsCamera.Instance;
            //Configurar posicion y hacia donde se mira
            CustomFpsCamera.Instance.setCamera(new Vector3(0, 930, 0), new Vector3(-400, 930, 0));

            prevEye = CustomFpsCamera.Instance.eye;
            //cargar sonido
            breathSound.loadSound(breathingSoundDir, HUDManager.Instance.PLAYER_VOLUME);
            hitSound.loadSound(hitSoundDir, HUDManager.Instance.PLAYER_VOLUME);
            //reproducir sonido de respawn
            playSound(walkSound, walkSoundDir, true);
            playSound(runSound, runSoundDir, true);
            runSound.stop();
            walkSound.stop();
        }
Ejemplo n.º 26
0
        public Camara()
        {
            GuiController.Instance.UserVars.addVar("pisada");
            Control focusWindows = GuiController.Instance.D3dDevice.CreationParameters.FocusWindow;

            mouseCenter = focusWindows.PointToScreen(
                new Point(
                    focusWindows.Width / 2,
                    focusWindows.Height / 2)
                );
            sonidoPisada1 = new TgcStaticSound();

            sonidoPisada1.loadSound(GuiController.Instance.AlumnoEjemplosDir + "GODMODE\\Media\\Sound\\pisada1corta.wav");
            sonidoPisada2 = new TgcStaticSound();
            sonidoPisada2.loadSound(GuiController.Instance.AlumnoEjemplosDir + "GODMODE\\Media\\Sound\\pisada2corta.wav");
        }
Ejemplo n.º 27
0
        public Portal()
        {
            var mesh = Game.Current.NewMesh("BallTextured");

            Add(_PartList[0] = new MeshStaticPart(mesh)
            {
                Texture = Game.Current.GetMaterial("BluePortal.png")
            });
            _PartList[1] = _Collider = new ObbCollider(mesh); Add(_Collider);
            var receptorMesh = Game.Current.NewMesh("BallTextured");

            Add(_PartList[2] = _Receptor = new MeshImmutableePart(receptorMesh)
            {
                Texture = Game.Current.GetMaterial("OrangePortal.png")
            });
            _SoundEffect = Game.Current.GetSound("Portal.wav", EffectVolume);
        }
 public GameSoundManager(string mediaDir, TgcDirectSound sound)
 {
     Menu          = new TgcMp3Player();
     Ambient       = new TgcMp3Player();
     SharkStalking = new TgcStaticSound();
     Crafting      = new TgcStaticSound();
     SharkDead     = new TgcStaticSound();
     SharkAppear   = new TgcStaticSound();
     SharkAttack   = new TgcStaticSound();
     Collect       = new TgcStaticSound();
     EquipWeapon   = new TgcStaticSound();
     WeaponHit     = new TgcStaticSound();
     HitToShark    = new TgcStaticSound();
     ToSurface     = new TgcStaticSound();
     Submerge      = new TgcStaticSound();
     Init(mediaDir, sound);
 }
Ejemplo n.º 29
0
        private void fire()
        {
            //Codigo de disparar
            Proyectil bala = new Proyectil(this);

            bala.inicializar();
            balas.Add(bala);

            //GuiController.Instance.Mp3Player.closeFile();
            // GuiController.Instance.Mp3Player.FileName = GuiController.Instance.AlumnoEjemplosMediaDir + "Kamikaze3D\\AK47\\gunshot.mp3";
            //GuiController.Instance.Mp3Player.play(false);

            TgcStaticSound sonidoTiro = new TgcStaticSound();

            sonidoTiro.loadSound(GuiController.Instance.AlumnoEjemplosMediaDir + "Kamikaze3D\\AK47\\gunshot.wav");
            sonidoTiro.play();
        }
Ejemplo n.º 30
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);
            }
        }
Ejemplo n.º 31
0
        public override void Init()
        {
            //BoundingBox
            //GuiController.Instance.Modifiers.addBoolean("BoundingBox", "BoundingBox", false);

            //Luz
            //GuiController.Instance.Modifiers.addFloat("lightIntensity", 0, 100, 50);
            //GuiController.Instance.Modifiers.addFloat("lightAttenuation", 0.1f, 2, 0.20f);

            //TODO Arreglar para despues :)
            Dictionary<string, TgcStaticSound> sonidos = new Dictionary<string, TgcStaticSound>();
            TgcStaticSound sonido = new TgcStaticSound();
            sonido.loadSound(MediaDir + "Audio\\pelota-tiro.wav", DirectSound.DsDevice);
            sonidos.Add("pelota-tiro", sonido);

            //this.partido = PartidoFactory.Instance.CrearPartido(pathRecursos, Input, sonidos, GuiController.Instance.ThirdPersonCamera);

            //Configurar camara en Tercer Persona
            //GuiController.Instance.ThirdPersonCamera.Enable = true;
            //GuiController.Instance.ThirdPersonCamera.setCamera(this.partido.Pelota.Position, 200, -250);
        }
Ejemplo n.º 32
0
        /// <summary>
        /// Método que se llama una sola vez,  al principio cuando se ejecuta el ejemplo.
        /// Escribir aquí todo el código de inicialización: cargar modelos, texturas, modifiers, uservars, etc.
        /// Borrar todo lo que no haga falta
        /// </summary>
        public override void Init()
        {
            //TODO Arreglar para despues :)
            Dictionary<string, TgcStaticSound> sonidos = new Dictionary<string, TgcStaticSound>();
            TgcStaticSound sonido = new TgcStaticSound();
            sonido.loadSound(MediaDir + "Audio\\pelota-tiro.wav", DirectSound.DsDevice);
            sonidos.Add("pelota-tiro", sonido);

            //FIXME arreglar para que el partido no tenga que recibir la camara.
            //this.partido = PartidoFactory.Instance.CrearPartido(pathRecursos, Input, sonidos, this.camaraInterna);

            //BoundingBox
            //GuiController.Instance.Modifiers.addBoolean("BoundingBox", "BoundingBox", false);

            //Luz
            //GuiController.Instance.Modifiers.addFloat("lightIntensity", 0, 100, 50);
            //GuiController.Instance.Modifiers.addFloat("lightAttenuation", 0.1f, 2, 0.20f);

            //Camara en 1ra persona
            this.camaraInterna = new TgcFpsCamera(new Vector3(260f, 170f, 390f), 400f, 300f, Input);
            Camara = this.camaraInterna;
            //GuiController.Instance.FpsCamera.setCamera(new Vector3(0, 10, -20), new Vector3(0, 0, 0));
        }
Ejemplo n.º 33
0
        /// <summary>
        /// Método que se llama una sola vez,  al principio cuando se ejecuta el ejemplo.
        /// Escribir aquí todo el código de inicialización: cargar modelos, texturas, modifiers, uservars, etc.
        /// Borrar todo lo que no haga falta
        /// </summary>
        public override void Init()
        {
            //Musica
            //GuiController.Instance.Modifiers.addBoolean("Musica", "Música", true);

            //BoundingBox
            //GuiController.Instance.Modifiers.addBoolean("BoundingBox", "BoundingBox", false);

            //Inteligencia Artificial
            //GuiController.Instance.Modifiers.addBoolean("IA", "IA", true);

            //Un boton para reiniciar las posiciones
            //GuiController.Instance.Modifiers.addButton("ReiniciarPosiciones", "Reiniciar Posiciones", new EventHandler(this.ReiniciarPosiciones_Click));

            //Luz
            //GuiController.Instance.Modifiers.addFloat("lightIntensity", 0, 100, 50);
            //GuiController.Instance.Modifiers.addFloat("lightAttenuation", 0.1f, 2, 0.20f);

            //Empiezo con un tema Random :)
            int numbreTrack = new Random().Next(Settings.Default.music.Count);
            //GuiController.Instance.Mp3Player.FileName = pathRecursos + Settings.Default.music[numbreTrack];

            //TODO Arreglar para despues :)
            Dictionary<string, TgcStaticSound> sonidos = new Dictionary<string, TgcStaticSound>();
            TgcStaticSound sonido = new TgcStaticSound();
            sonido.loadSound(MediaDir + "Audio\\pelota-tiro.wav", DirectSound.DsDevice);
            sonidos.Add("pelota-tiro", sonido);

            //Configurar camara en Tercer Persona
            camaraInterna = new TgcThirdPersonCamera();
            Camara = camaraInterna;

            this.pantallaActual = 0;

            //Creo el menu
            this.menu = new MenuInicial(MediaDir, camaraInterna, this);

            //Creo la configuracion del partido
            this.configuracionPartido = new ConfiguracionPartido(MediaDir, D3DDevice.Instance.Width, camaraInterna, this);

            //Creo el partido
            this.partido = PartidoFactory.Instance.CrearPartido(MediaDir, Input, sonidos, camaraInterna);

            drawer2D = new Drawer2D();

            //Mapa
            this.mapa = new CustomSprite();
            this.mapa.Bitmap = new CustomBitmap(MediaDir + "Texturas\\mapa.png", D3DDevice.Instance.Device);
            //this.mapa.Scaling = new Vector2(0.75f, 0.75f);
            Size textureSize = this.mapa.Bitmap.Size;
            this.mapa.Position = new Vector2((D3DDevice.Instance.Width - textureSize.Width) / 2, (D3DDevice.Instance.Height - textureSize.Height));

            this.puntoAzul = new CustomSprite();
            this.puntoAzul.Bitmap = new CustomBitmap(MediaDir + "Texturas\\radarAzul.png", D3DDevice.Instance.Device);
            this.puntoAzul.Scaling = new Vector2(0.03f, 0.03f);

            this.puntoNaranja = new CustomSprite();
            this.puntoNaranja.Bitmap = new CustomBitmap(MediaDir + "Texturas\\radarNaranja.png", D3DDevice.Instance.Device);
            this.puntoNaranja.Scaling = new Vector2(0.03f, 0.03f);

            //Color de fondo (BackgroundColor)
            D3DDevice.Instance.Device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, Color.Black, 1.0f, 0);

            //FIX que nos mando Mariano para poder bajar el Alpha en el PixelShader
            D3DDevice.Instance.Device.RenderState.ReferenceAlpha = 10;
        }