/// <summary> /// Adds a new room to the room manager. /// </summary> /// <param name="roomID">The id of the room.</param> /// <param name="_Room">The object of the room.</param> public static void Add(int roomID, Room _Room) { if (!Rooms.ContainsKey(roomID)) { Rooms.Add(roomID, _Room); Logging.logInfo("Room [" + roomID + "] loaded."); } }
public static int Open(int mapID, int userID) { Map _map = mapManager.getInstance(mapID); int tempRoomID = FindEmptyRoom(_map.ID); if (tempRoomID == 0) { Room _room = new Room(_map.ID); _room.mapID = _map.ID; _room.mapName = _map.Name; _room.fileName = _map.Filename; _room.ID = Rooms.Count; return _room.ID; } else { return tempRoomID; } }