public void Draw(SpriteBatch spriteBatch, Textures textures, SpriteFont font) { DrawInfoPanel(spriteBatch, textures, font); squares.Draw(spriteBatch, textures, gameAreaOffset); if (activeBrick != null) { DrawActiveBrick(spriteBatch, textures); } if (state == GameState.GameOver) { spriteBatch.DrawString(font, "GAME OVER", new Vector2(80, 140), Color.White); } else if (state == GameState.LevelUp) { spriteBatch.DrawString(font, $"LEVEL {level.Number}!", new Vector2(80, 140), Color.White); } else if (rowsClearedCombo > 0) { spriteBatch.DrawString(font, $"COMBO x{rowsClearedCombo}", new Vector2(80, 140), Color.White); } if (paused) { spriteBatch.DrawString(font, "PAUSE", new Vector2(100, 200), Color.White); } }
public void Draw(GameTime gameTime, SpriteBatch spriteBatch) { spriteBatch.Begin(); if (movementGrid != null) { movementGrid.Draw(spriteBatch); } if (matchGrid != null) { matchGrid.Draw(spriteBatch); } if (intersectionGrid != null) { intersectionGrid.Draw(spriteBatch); } spriteBatch.End(); }