Exemplo n.º 1
0
        public Prota(Model text,Model[] disp)
        {
            g_nave = new modelo(text);
            t_disp=disp;

            box = new caja(new Vector3(pos.X - 10f, pos.Y - 10f, -10f), new Vector3(pos.X + 10f, pos.Y + 10f, 10f));
        }
Exemplo n.º 2
0
 public item(int tip)
 {
     g_nave = new modelo(Game1.gema[tip]);
     tipo = tip;
     pos.X = 550;
     box = new caja(new Vector3(pos.X - 15f, pos.Y - 16f, -15f), new Vector3(pos.X + 15f, pos.Y + 4f, 15f));
 }
Exemplo n.º 3
0
 public NaveBsl(Model text, Model[] t_disp2)
 {
     av = 440f;
     box = new caja(new Vector3(pos.X - 10f, pos.Y - 10f, -10f), new Vector3(pos.X + 10f, pos.Y + 10f, +10f));
     g_nave = new modelo(text);
     t_disp = t_disp2;
     d_act = 1;
 }
Exemplo n.º 4
0
 public misil(Model text, Model[] t_disp2)
 {
     g_nave = new modelo(text);
     pos.X = 240;
     pos.Y = 0;
     box = new caja(new Vector3(pos.X - 16f, pos.Y - 8f, -7f), new Vector3(pos.X + 92f, pos.Y + 5f, 6f));
     t_disp = t_disp2;
     angle = getf_angle(Game1.naveP);
     g_nave.rotar(0, 0, angle);
     vel = 9+Game1.nivel;
 }
Exemplo n.º 5
0
 public NaveSC(Model text, Model[] t_disp2)
 {
     g_nave = new modelo(text);
     av = 440;
     box = new caja(new Vector3(pos.X - 10f, pos.Y - 10f, -10f), new Vector3(pos.X + 10f, pos.Y + 10f, +10f));
     t_disp = t_disp2;
     d_act = 2;
        /* for (int z = 0; z < nave.cant; z++)
     {
         anm[z] = new anim(Game1.estr, -1, pos);
         vc[z] = new Vector2(-100);
     }*/
 }
Exemplo n.º 6
0
        private void init(int direccion, bool tipo, Model graphA, disps str, float veloc, Vector2 posicion)
        {
            disps aux = str;
            dir = direccion;
            tip = tipo;
            graph = new modelo(graphA);
            Mstruct = new disps();
            Mstruct.elem = this;
            while (aux.sig != null)
                aux = aux.sig;
            aux.sig = Mstruct;
            Mstruct.ant = aux;

            vel = veloc;
            pos = posicion;
            box = new caja(new Vector3(pos.X - 10f, pos.Y - 10f, -10f), new Vector3(pos.X + 10f, pos.Y + 10f, +10f));
        }
Exemplo n.º 7
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);
            // TODO: use this.Content to load your game content here
            g_nave = Content.Load<Model>("modelos/nave1");
            g_enems[1] = g_enems[1] = Content.Load<Model>("modelos/nave6"); //misil
            g_enems[2] = Content.Load<Model>("modelos/nave5");//bomba
            g_nab = Content.Load<Model>("modelos/nave3");
            g_npics = Content.Load<Model>("modelos/nave4");
            g_naanch = Content.Load<Model>("modelos/nave2");
            for (int z = 0; z < 4; z++)
                gema[z] = Content.Load<Model>("modelos/gems"+(z+1));
            for (int z = 0; z < 4; z++)
                g_disp[z] = Content.Load<Model>("modelos/disparo"+z);
            for (int z = 0; z < 21; z++)
                g_explo[z] = Content.Load<Texture2D>("graphics/explos/screen" + z);
            fuente = Content.Load<SpriteFont>("fuentes/SpriteFont1");
            f_presentacion = Content.Load<SpriteFont>("fuentes/presentacion");
            estr = Content.Load<Texture2D>("graphics/est");
            barra = Content.Load<Texture2D>("graphics/barra");
            borde = Content.Load<Texture2D>("graphics/borde");
            audio = new AudioEngine("content/sound/sonidos.xgs");
            ondas = new WaveBank(audio,"content/sound/Wave Bank.xwb");
            sonidos = new SoundBank(audio,"content/sound/Sound Bank.xsb");
            Song miCancion;
            miCancion = Content.Load<Song>("sound/rockshit");
            MediaPlayer.Play(miCancion);
            MediaPlayer.IsRepeating = true;
            MediaPlayer.Volume = fondoVolume;
            aspectRatio = (float)graphics.PreferredBackBufferWidth /(float)graphics.PreferredBackBufferHeight;

            max_record = EO.load(StorageContainer.TitleLocation + "/Content/datos/datos.txt");
            View = Matrix.CreateLookAt(cameraPosition, Vector3.Zero, Vector3.Down);
            Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45.0f),
                    aspectRatio, 1.0f, 2000.0f);

            musicCategory = audio.GetCategory("Default");
            pantalla = -2;
            logo = new modelo(Content.Load<Model>("modelos/logo"));

            init();
            base.Initialize();
        }