Exemplo n.º 1
0
        public Fase13(ContentManager Content, GameWindow gw)
        {
            this.gw = gw;
            autor   = "FASE 13 - Pedro";

            _Content = Content;

            //playing_musica = false;
            //musica = Content.Load<Song>("Estados/Fase02/musica_fase2");
            texturaFundo = Content.Load <Texture2D>("Estados/Fase13/bg");
            texturaNave  = Content.Load <Texture2D>("Estados/Fase13/naveFase13");
            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");

            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);
            }
        }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 3
0
        public Fase8(ContentManager Content, GameWindow gw)
        {
            this.gw = gw;
            autor   = "FASE 8 - Michel";

            //playing_musica = false;
            //musica = Content.Load<Song>("Estados/Fase02/musica_fase2");
            texturaFundo = Content.Load <Texture2D>("Estados/Fase08/fundofase8");
            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, 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(1, texturaInimigo, posicao_i1, 0f, gw, 15, Content);
        }
Exemplo n.º 4
0
        public Fase15(ContentManager Content, GameWindow gw)
        {
            this.gw = gw;
            autor   = "FASE 15 - Christian Andrade - NÃO IMPLEMENTADA";

            playing_musica = false;
            musica         = Content.Load <Song>("Estados/Fase02/musica_fase2");
            texturaFundo   = Content.Load <Texture2D>("Estados/Fase02/fundoFase2");
            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, 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(1, texturaInimigo, posicao_i1, 0f, gw, 15, Content);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Construtor da fase
        /// </summary>
        public Fase4(ContentManager Content, GameWindow gw)
        {
            autor = "Fábio";

            this.gw = gw;

            playing_musica = false;
            musica         = Content.Load <Song>("Kalimba");
            texturaFundo   = Content.Load <Texture2D>("Estados/Fase04/fundoFase4");
            texturaNave    = Content.Load <Texture2D>("Estados/Fase04/naveFase4");
            //texturaAsteroids = Content.Load<Texture2D>("Estados/Fase04/asteroidsFase4");

            posicaoInicial_j1.X = (gw.ClientBounds.Width - texturaNave.Bounds.Width) / 2;
            posicaoInicial_j1.Y = (gw.ClientBounds.Height - texturaNave.Bounds.Height) / 2;
            jogador1            = new Nave_jogador(1, texturaNave, posicaoInicial_j1, 0, gw, Content);

            posicao_a1.X = randomizador.Next(gw.ClientBounds.Width);
            posicao_a1.Y = randomizador.Next(gw.ClientBounds.Height);
            //lista_asteroids.Add(new Nave_inimigo(1, texturaAsteroids, posicao_a1, 0f, gw, 15, Content));
        }
Exemplo n.º 6
0
        public Fase7(ContentManager Content, GameWindow Window)
        {
            #region loads principais
            this.gw = Window;
            autor   = "FASE 7 - Gabriel Henrique";
            Texture2D texturaNave = Content.Load <Texture2D>(Endereco + "Nave");
            fundo1    = Content.Load <Texture2D>(Endereco + "Galaxia");
            fundo2    = Content.Load <Texture2D>(Endereco + "Galaxia");
            musica    = Content.Load <Song>(Endereco + "Space music");
            posicao.X = Window.ClientBounds.Width / 2 - texturaNave.Width / 2;
            posicao.Y = Window.ClientBounds.Height / 2 - texturaNave.Height / 2;
            //jogador1 = new NaveGabriel(texturaNave, Color.White, posicao, 0f, "Teste", 3, 0, Window, texturaEscudo, Content.Load<SoundEffect>("chord"), texturaTiro, texturaBarra);
            jogador1       = new Nave_jogador(1, texturaNave, posicao, 0f, gw, Content);
            Texto.X        = 0;
            Texto.Y        = Window.ClientBounds.Height - 30;
            jogador1.morto = false;
            #endregion
            #region Load do fundo
            Tamanho1.Width  = gw.ClientBounds.Width;
            Tamanho1.Height = gw.ClientBounds.Height;
            Tamanho1.X      = 0;
            Tamanho1.Y      = 0;

            Tamanho2.Width  = gw.ClientBounds.Width;
            Tamanho2.Height = gw.ClientBounds.Height;
            Tamanho2.X      = gw.ClientBounds.Width;
            Tamanho2.Y      = 0;
            #endregion
            #region Load do inimigo
            texturaI = Content.Load <Texture2D>(Endereco + "asteroid");
            posI.X   = 100;
            posI.Y   = 100;
            inimigo  = new Nave_inimigo(1, texturaI, posI, 0f, gw, 3, Content);
            inimigos.Add(inimigo);
            texturaI = Content.Load <Texture2D>(Endereco + "asteroid");
            posI.X   = 500;
            posI.Y   = 400;
            inimigo  = new Nave_inimigo(1, texturaI, posI, 0f, gw, 3, Content);
            inimigos.Add(inimigo);
            #endregion
        }
Exemplo n.º 7
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
                );
        }
Exemplo n.º 8
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);
        }
Exemplo n.º 9
0
        public Fase2(ContentManager Content, GameWindow gw)
        {
            this.gw = gw;
            autor   = "FASE 2 - Carlos Moffatt";

            playing_musica = false;
            musica         = Content.Load <Song>("Estados/Fase02/musica_fase2");
            texturaFundo   = Content.Load <Texture2D>("Estados/Fase02/fundoFase2");
            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, 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);
            lista_inimigos.Add(new Nave_inimigo(1, texturaInimigo, posicao_i1, 0f, gw, 15, Content));
            posicao_i1.X = randomizador.Next(gw.ClientBounds.Width);
            posicao_i1.Y = randomizador.Next(gw.ClientBounds.Height);

            lista_inimigos.Add(new Nave_inimigo(1, texturaInimigo, posicao_i1, 0f, gw, 15, Content));
        }
Exemplo n.º 10
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
                );
        }