Example #1
0
    private void Start()
    {
        Instance = this;

        layout = new MapLayout();
        layout.Init(roomSize.x, roomSize.y);
        layout.GenerateLayout();

        SpawningRoom();
    }
    private void Update()
    {
        if (Input.GetKeyDown(KeyCode.Space))
        {
            parent.DestroyChildrens();
            parent.localScale = Vector3.one;

            layout = new MapLayout();
            layout.Init(roomSize.x, roomSize.y);
            layout.GenerateLayout();

            SpawningRoom();
        }
    }