예제 #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);
        }
예제 #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);
        }
예제 #3
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, "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);
        }