Пример #1
0
 public void CreateNew()
 {
     rows   = 42;
     cols   = 42;
     colors = Mondrian.CreateMondrian(rows, cols);
     rooms  = CreateRooms();
     // find start room
     currentRoom = rooms
                   .Where(x => RoomManager.SameColor(x.color, Mondrian.WHITE))
                   .MinBy(x => x.Area);
     currentRoom.isCleared = false;
 }
Пример #2
0
    Texture2D ComputeHighlightTexture()
    {
        int rows = Globals.RoomManager.Rows;
        int cols = Globals.RoomManager.Cols;

        Color32[,] img = new Color32[rows, cols];
        Mondrian.DrawRect(img, 0, cols, 0, rows, new Color32(0, 0, 0, 255));
        foreach (Room r in Globals.RoomManager.Rooms)
        {
            Mondrian.FillRect(img, r.x1, r.x2, r.y1, r.y2, new Color32(255, 128, 0, 255));
        }
        return(CreateTexture(img));
    }