public Fase16(ContentManager Content, GameWindow gw)
        {
            this.gw = gw;
            autor   = "FASE 16 - Germano";

            _Content = Content;

            playing_musica = false;
            musica         = Content.Load <Song>("Kalimba");
            texturaFundo   = Content.Load <Texture2D>("Estados/Fase16/FundoFase16");
            texturaNave    = Content.Load <Texture2D>("Estados/Fase16/NaveFase16");
            posicao_j1.X   = (gw.ClientBounds.Width - texturaNave.Bounds.Width) / 2;
            posicao_j1.Y   = (gw.ClientBounds.Height - texturaNave.Bounds.Height) / 2;
            jogador1       = new Nave_jogador(1, texturaNave, posicao_j1, 0f, gw, Content);

            texturaInimigo        = Content.Load <Texture2D>("Estados/Fase02/nave_inimiga1");
            posicao_i1.X          = randomizador.Next(gw.ClientBounds.Width);
            posicao_i1.Y          = randomizador.Next(gw.ClientBounds.Height);
            inimigo1              = new Nave_inimigo(0, texturaInimigo, posicao_i1, 0f, gw, 15, Content, randomizador.Next(60));
            asteroide_gerenciador = new Asteroide(Content.Load <Texture2D>("Asteroides"), Vector2.Zero, 0.0f, gw, Content);

            for (int i = 0; i < qtdInimigos; i++)
            {
                posicao_i1.X = randomizador.Next(gw.ClientBounds.Width);
                posicao_i1.Y = randomizador.Next(gw.ClientBounds.Height);
                inimigo1     = new Nave_inimigo(0, texturaInimigo, posicao_i1, 0f, gw, 15, Content, randomizador.Next(60));
                listaInimigos.Add(inimigo1);
            }
        }
Exemple #2
0
        public Fase12(ContentManager Content, GameWindow gw)
        {
            this.gw = gw;
            autor   = "FASE 12 - Paulo Roberto";

            _Content = Content;

            inimigosRestantes = 5;

            #region music
            playing_musica = false;
            musica         = Content.Load <Song>("Estados/Fase03/fase3");
            #endregion

            texturaFundo = Content.Load <Texture2D>("Estados/Fase12/FundoFase12");
            texturaNave  = Content.Load <Texture2D>("Estados/Fase02/naveFase2");
            posicao_j1.X = (gw.ClientBounds.Width - texturaNave.Bounds.Width) / 2;
            posicao_j1.Y = (gw.ClientBounds.Height - texturaNave.Bounds.Height) / 2;
            jogador1     = new Nave_jogador(1, texturaNave, posicao_j1, 0, gw, Content);

            texturaInimigo = Content.Load <Texture2D>("Estados/Fase02/nave_inimiga1");
            posicao_i1.X   = randomizador.Next(gw.ClientBounds.Width);
            posicao_i1.Y   = randomizador.Next(gw.ClientBounds.Height);


            for (int i = 0; i < 5; i++)
            {
                posicao_i1.X = randomizador.Next(gw.ClientBounds.Width);
                posicao_i1.Y = randomizador.Next(gw.ClientBounds.Height);
                inimigo1     = new Nave_inimigo(0, texturaInimigo, posicao_i1, 0f, gw, 15, Content, randomizador.Next(60));
                listaInimigos.Add(inimigo1);
            }

            asteroide_gerenciador = new Asteroide(
                Content.Load <Texture2D>("Asteroides"),
                Vector2.Zero,
                0.0f,
                gw,
                Content
                );
        }
Exemple #3
0
        public Fase9(ContentManager conteudo, GameWindow janela)
        {
            autor = "FASE 9 - Lucas Abend";

            this.conteudo = conteudo;
            this.gw       = janela;
            // spriteBatch = new SpriteBatch(GraphicsDevice);
            nave    = conteudo.Load <Texture2D>(file_path + "Nave_fase9");
            desenho = conteudo.Load <Texture2D>("Fundo_espaco");
            musica  = conteudo.Load <Song>("Kalimba");

            posicao1.X = (janela.ClientBounds.Width / 2) - nave.Width / 2 - 150;
            posicao1.Y = (janela.ClientBounds.Height / 2) - nave.Height / 2;
            //jogador1 = new Nave_fase9(nave, posicao1, Color.Red, janela, conteudo.Load<SoundEffect>("ding"));
            jogador1 = new Nave_jogador(1, nave, posicao1, 0f, gw, conteudo);

            /* posicao2.X = (janela.ClientBounds.Width / 2) - nave.Width / 2 + 150;
             * posicao2.Y = (janela.ClientBounds.Height / 2) - nave.Height / 2;
             * jogador2 = new Nave_fase9(nave, posicao2, Color.Blue, janela, conteudo.Load<SoundEffect>("ding")); */

            asteroide_gerenciador = new Asteroide(conteudo.Load <Texture2D>("Asteroides"), Vector2.Zero, 0.0f, gw, conteudo);
        }
Exemple #4
0
        /// <summary>
        /// Construtor da fase1
        /// </summary>
        public Fase3(ContentManager Content, GameWindow gw)
        {
            this.gw = gw;
            autor   = "FASE 3 - Daniel Coimbra";

            _Content = Content;

            #region init audio
            playing_musica = false;
            musica         = Content.Load <Song>(file_path + "fase3");
            #endregion

            inimigosRestantes = 5;
            texturaFundo      = Content.Load <Texture2D>(file_path + "fundo_fase3");
            texturaNave       = Content.Load <Texture2D>(file_path + "Nave_fase3");
            posicao_j1.X      = (gw.ClientBounds.Width / 2) - texturaNave.Width / 2 - 150;
            posicao_j1.Y      = (gw.ClientBounds.Height / 2) - texturaNave.Height / 2;
            jogador1          = new Nave_jogador(1, texturaNave, posicao_j1, 0f, gw, Content);

            texturaInimigo = Content.Load <Texture2D>(file_path + "nave_inimiga");

            for (int i = 0; i < 5; i++)
            {
                posicao_i1.X = randomizador.Next(gw.ClientBounds.Width);
                posicao_i1.Y = randomizador.Next(gw.ClientBounds.Height);
                inimigo1     = new Nave_inimigo(0, texturaInimigo, posicao_i1, 0f, gw, 15, Content, randomizador.Next(60));
                listaInimigos.Add(inimigo1);
            }

            asteroide_gerenciador = new Asteroide(
                Content.Load <Texture2D>("Asteroides"),
                Vector2.Zero,
                0.0f,
                gw,
                Content
                );
        }