コード例 #1
0
ファイル: Map.cs プロジェクト: Zolomon/Crawl
 public Room SetRoom(int x, int y, Room room)
 {
     Room tempRoom = null;
     if ((x >= 0 && x < Width) &&
         (y >= 0 && y < Height))
     {
         if (Rooms[(Width * y) + x] != null)
         {
             tempRoom = Rooms[(Width * y) + x];
         }
         Rooms[(Width * y) + x] = room;
     }
     return tempRoom;
 }
コード例 #2
0
ファイル: Map.cs プロジェクト: Zolomon/Crawl
 public Map(int width, int height)
 {
     this.Width = width;
     this.Height = height;
     Rooms = new Room[this.Width * this.Height];
 }