-
-
Save todorok1/cca239b9619d0ace70422bd5c961907e to your computer and use it in GitHub Desktop.
シンプルRPGチュートリアル第116回 コマンドウィンドウを制御するクラス
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> | |
| void SelectCommand() | |
| { | |
| if (_battleManager == null) | |
| { | |
| return; | |
| } | |
| if (_battleManager.BattlePhase != BattlePhase.InputCommand) | |
| { | |
| return; | |
| } | |
| if (!_canSelect) | |
| { | |
| return; | |
| } | |
| if (Input.GetKeyUp(KeyCode.UpArrow)) | |
| { | |
| SetPreCommand(); | |
| uiController.ShowSelectedCursor(_selectedCommand); | |
| } | |
| else if (Input.GetKeyUp(KeyCode.DownArrow)) | |
| { | |
| SetNextCommand(); | |
| uiController.ShowSelectedCursor(_selectedCommand); | |
| } | |
| else if (InputGameKey.ConfirmButton()) | |
| { | |
| // 選択時の効果音を再生します。 | |
| AudioManager.Instance.PlaySe(SeNames.OK); | |
| _battleManager.OnCommandSelected(_selectedCommand); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment