private void roomGrid_MouseClick(object sender, MouseEventArgs e)
 {
     int x = (int)Math.Floor((double)e.X / 8);
     int y = (int)Math.Floor((double)e.Y / 8);
     if (currentAdventure != null && x >= 0 && y >= 0 && x < (16) && y < (16))
     {
         if (currentAdventure.rooms[x,y] == null)
         {
             currentAdventure.rooms[x, y] = currentAdventure.templateRoom.copyRoom();
         }
         currentRoom = currentAdventure.rooms[x, y];
         roomMusicList.SelectedIndex = currentRoom.music + 1;
         roomX = x;
         roomY = y;
         DrawRoom();
         DrawRoomGrid();
         roomOptions.Enabled = true;
         darkRoomCheck.Checked = currentRoom.dark;
         hblockCheck.Checked = currentRoom.hblock;
         vblockCheck.Checked = currentRoom.vblock;
     }
 }
Beispiel #2
0
 public Room copyRoom()
 {
     Room newRoom = new Room();
     this.tileMap.CopyTo(newRoom.tileMap, 0);
     return newRoom;
 }