Ejemplo n.º 1
0
    //public static List<RoomNode> SortRoomByArea( List<RoomNode> rooms)
    //{
    //    return rooms.OrderBy();
    //}

    public void SetRoomContent(RoomType roomType, RoomNode room, Map map, System.Random seed, MapSetting mapSetting)
    {
        //SetDoors(doors, map);
        room.FindPath();
        switch (roomType)
        {
        case RoomType.Boss:
            SetBossRoom(room, map, seed);
            break;

        case RoomType.Loot:
            SetLootRoom(room, map, seed, mapsetting);
            break;

        case RoomType.Trap:
            SetTrapRoom(room, map, seed);
            break;

        case RoomType.Normal:
            SetNormalRoom(room, map, seed);
            break;

        //case RoomType.Cave:
        //    SetCaveRoom(room,map, mapsetting, seed);
        //    break;
        default:
            break;
        }
        SetRoomCorridors(room, map);
        foreach (Vector2Int door in room.DoorWays)
        {
            //Debug.Log(door);
        }
        //SetRoomBorder(room, map);
    }