//Teken alle blokken in de Tetromino public void Draw(SpriteBatch spriteBatch, Grid grid) { for (int x = 0; x < Width; x++) for (int y = 0; y < Height; y++) if (blocks[x, y] != null) blocks[x, y].Draw(spriteBatch, Position.X + x, Position.Y + y, grid); }
public PlayManager(Grid playingGrid) { this.playingGrid = playingGrid; }
// Het volle blokje wordt getekend op de juiste positie en met de doorgegeven kleur-overlay public void Draw(SpriteBatch spriteBatch, int x, int y, Grid grid) { spriteBatch.Draw(ResourceManager.Textures["Block"], new Rectangle(x * size + grid.Position.X, y * size + grid.Position.Y, size, size), color); }