Example #1
0
 public void Draw(SpriteBatch spriteBatch, HexagonGrid grid, Images images, FarSeerCamera2D camera)
 {
     foreach (Cell cell in grid)
     {
         Vector2 centerPixel    = DeterminePositionToDraw(cell);
         Vector2 screenPosition = camera.ConvertWorldToScreen(centerPixel);
         if (_viewport.Contains(screenPosition))
         {
             DrawCell(spriteBatch, cell, images, centerPixel);
         }
     }
 }