Exemple #1
0
    public PotentialRoom(DungeonBuilder builder, Vector2Int pos)
    {
        this.pos = pos;

        for (int x = pos.x - 1; x < 3; x++)
        {
            for (int y = pos.y - 1; y < 3; y++)
            {
                Room room = builder.GetRoom(pos + new Vector2Int(x, y));
                if (!room)
                {
                    continue;
                }

                weight += room.OpenDoorCount;
            }
        }
    }