Beispiel #1
0
 public void Draw(GameTime gameTime, SpriteBatch spriteBatch)
 {
     #region Desenhar fundo
     //spriteBatch.Draw(fundo1, Tamanho1, Color.White);
     spriteBatch.Draw(fundo1, new Rectangle(0, 0, gw.ClientBounds.Width,
                                            gw.ClientBounds.Height), Color.White);
     spriteBatch.Draw(fundo2, new Rectangle(0, 0, gw.ClientBounds.Width,
                                            gw.ClientBounds.Height), Color.White);
     //spriteBatch.Draw(fundo2, Tamanho2, Color.White);
     #endregion
     #region Textos
     spriteBatch.DrawString(Game1.fonte, "PONTOS: ", new Vector2(5, 5), Color.White);
     spriteBatch.DrawString(Game1.fonte, autor, new Vector2(gw.ClientBounds.Width - Game1.fonte.MeasureString(autor).X - 5, 5), Color.White);
     #endregion
     #region Jogador e objetivo(texto)
     jogador1.Draw(gameTime, spriteBatch);
     //spriteBatch.DrawString(Game1.fonte, "Objetivo: Atravesse a galáxia 7 vezes para a direita", Texto, Color.White);
     #endregion
     #region Desenhar inimigo
     foreach (Nave_inimigo inimigo in inimigos)
     {
         inimigo.Draw(gameTime, spriteBatch);
     }
     #endregion
 }
Beispiel #2
0
        public void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(texturaFundo, new Rectangle(0, 0, gw.ClientBounds.Width,
                                                         gw.ClientBounds.Height), Color.White);

            spriteBatch.DrawString(
                Game1.fonte
                , "Inimigos restantes: " + inimigosRestantes
                , new Vector2(5, 5)
                , Color.White
                );

            spriteBatch.DrawString(
                Game1.fonte
                , "Naves: " + Nave_jogador.vidas
                , new Vector2(Game1.fonte.MeasureString("Inimigos restantes: 999").X, 5)
                , Color.White
                );

            spriteBatch.DrawString(
                Game1.fonte
                , autor
                , new Vector2(gw.ClientBounds.Width - Game1.fonte.MeasureString(autor).X - 5, 5)
                , Color.White
                );

            jogador1.Draw(gameTime, spriteBatch);

            for (int i = 0; i < listaInimigos.Count; i++)
            {
                listaInimigos[i].Draw(gameTime, spriteBatch);
            }

            asteroide_gerenciador.Draw(gameTime, spriteBatch);
        }
        public void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(texturaFundo, new Rectangle(0, 0, gw.ClientBounds.Width,
                                                         gw.ClientBounds.Height), Color.White);

            //spriteBatch.DrawString(Game1.fonte, "PONTOS: ", new Vector2(5, 5), Color.White);
            spriteBatch.DrawString(Game1.fonte, autor,
                                   new Vector2(
                                       gw.ClientBounds.Width - Game1.fonte.MeasureString(autor).X - 5,
                                       5), Color.White);

            jogador1.Draw(gameTime, spriteBatch);
            inimigo1.Draw(gameTime, spriteBatch);
        }
Beispiel #4
0
        public void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            // spriteBatch.Draw(desenho, new Rectangle(0, 0, desenho.Width, desenho.Height), Color.Blue, new Vector2(desenho.Width / 2, desenho.Height / 2), 1, SpriteEffects.None, 0);
            spriteBatch.Draw(desenho, new Rectangle(0, 0, gw.ClientBounds.Width, gw.ClientBounds.Height), Color.Blue);

            asteroide_gerenciador.Draw(gameTime, spriteBatch);

            spriteBatch.DrawString(Game1.fonte, "PONTOS: ", new Vector2(5, 5), Color.White);
            spriteBatch.DrawString(Game1.fonte, autor,
                                   new Vector2(
                                       gw.ClientBounds.Width - Game1.fonte.MeasureString(autor).X - 5,
                                       5), Color.White);

            jogador1.Draw(gameTime, spriteBatch);
        }
        public void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            //spriteBatch.Draw(fundo, posFundo, Color.White);

            spriteBatch.Draw(texturaFundo, new Rectangle(0, 0, gw.ClientBounds.Width,
                                                         gw.ClientBounds.Height), Color.White);

            spriteBatch.DrawString(Game1.fonte, "PONTOS: ", new Vector2(5, 5), Color.White);

            spriteBatch.DrawString(Game1.fonte, autor, new Vector2(gw.ClientBounds.Width - Game1.fonte.MeasureString(autor).X - 5, 5), Color.White);

            jogador1.Draw(gameTime, spriteBatch);

            //foreach (Nave_inimigo asteroids in lista_asteroids)
            //{
            //    asteroids.Draw(gameTime, spriteBatch);
            //}
        }