コード例 #1
0
 public EditorGrid()
 {
     sfcGrid = new Surface (new Size (Constants.Constants.MAP_WIDTH + Constants.Constants.MAP_WIDTH *
         Tile.WIDTH, Constants.Constants.MAP_HEIGHT + Constants.Constants.MAP_HEIGHT * Tile.HEIGHT));
     sfcGrid.Fill (Color.Transparent);
     Graphic vertical = new Graphic (Color.Black, 1, Tile.HEIGHT * Constants.Constants.MAP_HEIGHT
         + Constants.Constants.MAP_HEIGHT * 2);
     Graphic horizont = new Graphic (Color.Black, Tile.WIDTH * Constants.Constants.MAP_WIDTH +
         Constants.Constants.MAP_WIDTH * 2, 1);
     for (int x=0; x < Constants.Constants.MAP_WIDTH; x++) {
         vertical.Draw (sfcGrid, x * 2 + x * Tile.WIDTH, 0, 255, true);
     }
     for (int y=0; y < Constants.Constants.MAP_HEIGHT; y++) {
         horizont.Draw (sfcGrid, 0, y * 2 + y * Tile.HEIGHT, 255, true);
     }
 }