Esempio n. 1
0
    private void HorizontalSplit()
    {
        horizontalSplit = true;
        SplitRoom topEl    = new SplitRoom(left, right, top, bottom + GetHeight() / 2);
        SplitRoom bottomEl = new SplitRoom(left, right, top - GetHeight() / 2, bottom);

        leftRoom  = topEl;
        rightRoom = bottomEl;
        leftRoom.Split();
        rightRoom.Split();
    }
Esempio n. 2
0
    // Start is called before the first frame update
    void Start()
    {
        SplitRoom room = new SplitRoom(left, right, top, bottom);

        room.maxHeight = maxHeight;
        room.maxWidth  = maxWidth;
        room.minHeight = minHeight;
        room.minWidth  = minWidth;
        room.Split();
        room.Trim();
        room.CreateAndDrawRoom();
    }
Esempio n. 3
0
    private void VerticalSplit()
    {
        verticalSplit = true;
        SplitRoom leftEl  = new SplitRoom(left, right - GetWidth() / 2, top, bottom);
        SplitRoom rightEl = new SplitRoom(left + GetWidth() / 2, right, top, bottom);

        leftRoom  = leftEl;
        rightRoom = rightEl;

        leftRoom.Split();
        rightRoom.Split();
    }