Пример #1
0
    private void Start()
    {
        if (levelSize == null)
        {
            return;
        }

        var startingPoint = new LevelCoordinate
        {
            Height = 0,
            Width  = Random.Range(0, levelSize.Width)
        };

        levelRenderer  = GetComponent <LevelRenderer>();
        roomCollection = GetComponent <RoomCollection>();

        layoutCreator = new FourByFourLayout(roomCollection.GetRoomTypes(), startingPoint);

        bounds = levelRenderer.RenderBaseLevel(layoutCreator);
    }