コード例 #1
0
    private void OnClickButton(JailPuzzleButton jailPuzzleButton)
    {
        jailPuzzleButton.CurrentRotation++;
        if (jailPuzzleButton.CurrentRotation > 3)
        {
            jailPuzzleButton.CurrentRotation = 0;
        }

        SetButtonRotation(jailPuzzleButton);
        AudioManager.Instance.PlaySFX(ButtonRotateClip);
        CheckWin();
    }
コード例 #2
0
 private void SetButtonRotation(JailPuzzleButton button)
 {
     button.transform.rotation = Quaternion.Euler(0, 0, 90 * button.CurrentRotation);
 }
コード例 #3
0
 private void SetSelectedButton(JailPuzzleButton jailPuzzleButton, Button button)
 {
     _selectedButton = jailPuzzleButton;
     _eventSystem.SetSelectedGameObject(button.gameObject);
 }