Exemple #1
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);
        }
Exemple #2
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(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);
            asteroide_gerenciador.Draw(gameTime, spriteBatch);
        }