-
-
Save todorok1/af6cdfd2493db9939f1aba939b1fb1e8 to your computer and use it in GitHub Desktop.
シンプルRPGチュートリアル第118回 お店画面全体を管理するクラス
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> | |
| /// <param name="selectedIndex">選択された選択肢のインデックス</param> | |
| public void OnSelectedShopOption(int selectedIndex) | |
| { | |
| _mapMessageWindowController.HideWindow(); | |
| if (selectedIndex == 0) | |
| { | |
| // 買うを選択した場合の処理です。 | |
| _selectedCommand = ShopCommand.Buy; | |
| _mapMessageWindowController.HideWindow(); | |
| _windowController.SetUpWindow(); | |
| _windowController.SetPageElement(); | |
| _windowController.ShowWindow(); | |
| StartCoroutine(DelaySetSelectState()); | |
| } | |
| else if (selectedIndex == 1) | |
| { | |
| // 売るを選択した場合の処理です。 | |
| _selectedCommand = ShopCommand.Sell; | |
| _mapMessageWindowController.HideWindow(); | |
| _windowController.SetUpWindow(); | |
| _windowController.SetPageElement(); | |
| _windowController.ShowWindow(); | |
| StartCoroutine(DelaySetSelectState()); | |
| } | |
| else | |
| { | |
| // キャンセルを選択した場合はイベントに戻ります。 | |
| _selectedCommand = ShopCommand.Exit; | |
| ShowExitMessage(); | |
| } | |
| } | |
| /// <summary> | |
| /// 選択ウィンドウで選択可能な状態にするための処理です。 | |
| /// </summary> | |
| IEnumerator DelaySetSelectState() | |
| { | |
| yield return null; | |
| _windowController.SetCanSelectState(true); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment