-
-
Save todorok1/1ae587874619fdf6023ac5114a4814d8 to your computer and use it in GitHub Desktop.
シンプルRPGチュートリアル第117回 選択肢ウィンドウの動作を制御するクラス
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <summary> | |
| /// 決定ボタンが押された時の処理です。 | |
| /// </summary> | |
| protected virtual void OnPressedConfirmButton() | |
| { | |
| if (_callback != null) | |
| { | |
| _callback.OnSelectedOption(_selectedIndex); | |
| } | |
| StartCoroutine(HideProcess()); | |
| // 選択時の効果音を再生します。 | |
| AudioManager.Instance.PlaySe(SeNames.OK); | |
| } | |
| /// <summary> | |
| /// キャンセルボタンが押された時の処理です。 | |
| /// </summary> | |
| protected virtual void OnPressedCancelButton() | |
| { | |
| // キャンセルされた場合は、区別できるように-1を渡します。 | |
| int canceledIndex = -1; | |
| if (_callback != null) | |
| { | |
| _callback.OnSelectedOption(canceledIndex); | |
| } | |
| StartCoroutine(HideProcess()); | |
| // キャンセル時の効果音を再生します。 | |
| AudioManager.Instance.PlaySe(SeNames.Cancel); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment