Beispiel #1
0
    // Create Mode인 경우
    void SetGamePanel_Create(ButtonManager03 buttonManager)
    {
        if (gridSizeSlider != null)
        {
            gridSizeSlider.onValueChanged.AddListener(delegate { buttonManager.SetGameboardGrid((int)gridSizeSlider.value); });
            confirmButton.onClick.AddListener(() => buttonManager.SetGamePanel_Create());
        }
        else
        {
            // Game Board 리셋
            boardResetButton.onClick.AddListener(() => buttonManager.ResetGameBoard());

            // Game Board 크기 조절 Slider
            boardSizeSlider.onValueChanged.AddListener(delegate { buttonManager.ChangeBoardSize(boardSizeSlider.value); });

            cubeResetButton.onClick.AddListener(() => buttonManager.ResetCubes());
            plusButton.onClick.AddListener(() => buttonManager.PlusCube());
            minusButton.onClick.AddListener(() => buttonManager.MinusCube());
        }
    }