// Token: 0x06000042 RID: 66 RVA: 0x00003E80 File Offset: 0x00002080
        public static PrototypeDungeonRoom CreateRoomFromTexture(Texture2D texture)
        {
            int width  = texture.width;
            int height = texture.height;
            PrototypeDungeonRoom newPrototypeDungeonRoom = RoomFactory.GetNewPrototypeDungeonRoom(width, height);

            PrototypeDungeonRoomCellData[] array = RoomFactory.m_cellData.GetValue(newPrototypeDungeonRoom) as PrototypeDungeonRoomCellData[];
            array = new PrototypeDungeonRoomCellData[width * height];
            for (int i = 0; i < width; i++)
            {
                for (int j = 0; j < height; j++)
                {
                    array[i + j * width] = RoomFactory.CellDataFromColor(texture.GetPixel(i, j));
                }
            }
            RoomFactory.m_cellData.SetValue(newPrototypeDungeonRoom, array);
            newPrototypeDungeonRoom.name = texture.name;
            return(newPrototypeDungeonRoom);
        }
        // Token: 0x06000047 RID: 71 RVA: 0x0000407C File Offset: 0x0000227C
        public static PrototypeDungeonRoom CreateEmptyRoom(int width = 12, int height = 12)
        {
            PrototypeDungeonRoom result;

            try
            {
                PrototypeDungeonRoom newPrototypeDungeonRoom = RoomFactory.GetNewPrototypeDungeonRoom(width, height);
                RoomFactory.AddExit(newPrototypeDungeonRoom, new Vector2((float)(width / 2), (float)height), DungeonData.Direction.NORTH);
                RoomFactory.AddExit(newPrototypeDungeonRoom, new Vector2((float)(width / 2), 0f), DungeonData.Direction.SOUTH);
                RoomFactory.AddExit(newPrototypeDungeonRoom, new Vector2((float)width, (float)(height / 2)), DungeonData.Direction.EAST);
                RoomFactory.AddExit(newPrototypeDungeonRoom, new Vector2(0f, (float)(height / 2)), DungeonData.Direction.WEST);
                PrototypeDungeonRoomCellData[] array = RoomFactory.m_cellData.GetValue(newPrototypeDungeonRoom) as PrototypeDungeonRoomCellData[];
                array = new PrototypeDungeonRoomCellData[width * height];
                for (int i = 0; i < width; i++)
                {
                    for (int j = 0; j < height; j++)
                    {
                        array[i + j * width] = new PrototypeDungeonRoomCellData
                        {
                            state      = CellType.FLOOR,
                            appearance = new PrototypeDungeonRoomCellAppearance
                            {
                                OverrideFloorType = CellVisualData.CellFloorType.Stone
                            }
                        };
                    }
                }
                RoomFactory.m_cellData.SetValue(newPrototypeDungeonRoom, array);
                newPrototypeDungeonRoom.UpdatePrecalculatedData();
                result = newPrototypeDungeonRoom;
            }
            catch (Exception e)
            {
                Tools.PrintException(e, "FF0000");
                result = null;
            }
            return(result);
        }