Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 5th, 2012  |  syntax: C#  |  size: 0.62 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. private static void DrawTiles()
  2.         {
  3.             for (int i = (int)View.LeftLimit.X;
  4.                 i <= View.CameraCoords.X + Global.ViewDistance.X && i > 0 && i < World.WorldSize.X;
  5.                 i++)
  6.             {
  7.                 for (int y = (int)View.LeftLimit.Y;
  8.                     y <= View.CameraCoords.Y + Global.ViewDistance.Y && y > 0 && y < World.WorldSize.Y;
  9.                     y++)
  10.                 {
  11.                     if (World.Tilemap[i, y] != null)
  12.                     {
  13.                         World.Tilemap[i, y].Draw();
  14.                     }
  15.                 }
  16.             }
  17.         }