Пример #1
0
 //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);
 }
Пример #2
0
 public PlayManager(Grid playingGrid)
 {
     this.playingGrid = playingGrid;
 }
Пример #3
0
 // 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);
 }