-
-
Save todorok1/6a2bebad627ccdc7a1d184be39c68763 to your computer and use it in GitHub Desktop.
シンプルRPGチュートリアル第123回 タイトル画面のつづきからのメニューを制御するクラス
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> | |
| bool CanLoadSlot() | |
| { | |
| var saveSlot = _saveDataManager.GetSaveSlot(_selectedSlot); | |
| if (saveSlot == null) | |
| { | |
| return false; | |
| } | |
| var statusInfo = saveSlot.saveInfoStatus; | |
| if (statusInfo == null) | |
| { | |
| return false; | |
| } | |
| return true; | |
| } | |
| /// <summary> | |
| /// 決定ボタンが押された時の処理です。 | |
| /// </summary> | |
| void OnPressedConfirmButton() | |
| { | |
| // セーブ枠がロードできない場合は処理を抜けます。 | |
| if (!CanLoadSlot()) | |
| { | |
| return; | |
| } | |
| // 選択時の効果音を再生します。 | |
| AudioManager.Instance.PlaySe(SeNames.OK); | |
| _canSelect = false; | |
| _titleMenuManager.OnSelectedSlotId(_selectedSlot); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment