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 }
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); }