Beispiel #1
0
    // 혼자하기 유형 01인 경우
    void SetGamePanel01(ButtonManager03 buttonManager)
    {
        // Game Board 리셋
        boardResetButton.onClick.AddListener(() => buttonManager.ResetGameBoard());

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

        // 정답 확인 버튼
        checkAnswerButton.onClick.AddListener(() => buttonManager.CheckAnswer());
    }
Beispiel #2
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());
        }
    }