private void OnClickButton(JailPuzzleButton jailPuzzleButton) { jailPuzzleButton.CurrentRotation++; if (jailPuzzleButton.CurrentRotation > 3) { jailPuzzleButton.CurrentRotation = 0; } SetButtonRotation(jailPuzzleButton); AudioManager.Instance.PlaySFX(ButtonRotateClip); CheckWin(); }
private void SetButtonRotation(JailPuzzleButton button) { button.transform.rotation = Quaternion.Euler(0, 0, 90 * button.CurrentRotation); }
private void SetSelectedButton(JailPuzzleButton jailPuzzleButton, Button button) { _selectedButton = jailPuzzleButton; _eventSystem.SetSelectedGameObject(button.gameObject); }