Beispiel #1
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();
    }
Beispiel #2
0
 public void Trim()
 {
     left   += borders;
     right  -= borders;
     top    -= borders;
     bottom += borders;
     if (leftRoom != null)
     {
         leftRoom.Trim();
     }
     if (rightRoom != null)
     {
         rightRoom.Trim();
     }
 }