コード例 #1
0
ファイル: Map.cs プロジェクト: rafiqd/NetworkDefense
 /// <summary>
 /// Creates a new Map
 /// </summary>
 /// <param name="ixlen">number of tiles wide</param>
 /// <param name="iylen">number of tiles high</param>
 public Map(int ixlen, int iylen)
 {
     int xlen = ixlen / size;
     int ylen = iylen / size;
     map = new int[ylen][];
     for (int i = 0; i < ylen; ++i)
     {
         map[i] = new int[xlen];
         for (int j = 0; j < xlen; ++j)
             map[i][j] = 0;
     }
     currentMap = this;
 }
コード例 #2
0
ファイル: MapCreator.cs プロジェクト: rafiqd/NetworkDefense
 /// <summary>
 /// MapCreator ctor, edits the map that is passed in
 /// </summary>
 /// <param name="map">Map that you want to edit</param>
 public MapCreator(Map map)
 {
     this.map = map;
 }