Skip to content

Instantly share code, notes, and snippets.

@todorok1
Created April 27, 2025 07:23
Show Gist options
  • Save todorok1/3a1a34d6c605a537303216030ec0deeb to your computer and use it in GitHub Desktop.
Save todorok1/3a1a34d6c605a537303216030ec0deeb to your computer and use it in GitHub Desktop.
シンプルRPGチュートリアル第70回 メニュー画面全体を管理するクラス
/// <summary>
/// 選択されたメニューに応じた処理を呼び出します。
/// </summary>
void HandleMenu()
{
switch (SelectedMenu)
{
case MenuCommand.Item:
case MenuCommand.Magic:
ShowItemMenu();
break;
case MenuCommand.Equipment:
// 装備メニューを開く処理
break;
case MenuCommand.Status:
// ステータスメニューを開く処理
break;
case MenuCommand.Save:
// セーブメニューを開く処理
break;
case MenuCommand.QuitGame:
// ゲーム終了処理
break;
case MenuCommand.Close:
_topMenuWindowController.CloseMenu();
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment