/// <summary> /// 调用房间 /// </summary> /// <param name="targetRoom"></param> /// <returns></returns> public IEnumerator DoBuildRoom(RoomData roomData) { if (GetRoomInstance(roomData.index) != null) { Debug.LogError("房间 " + roomData.index + " 已经创建了"); } else { RoomInstance room = RoomInstance.Create(this, roomData); m_Rooms.Add(room); yield return(room.BuildRoom(this)); } }