Skip to content

Instantly share code, notes, and snippets.

@todorok1
Last active May 25, 2025 08:44
Show Gist options
  • Select an option

  • Save todorok1/3e27933c6f05150d058480e7cee78dd5 to your computer and use it in GitHub Desktop.

Select an option

Save todorok1/3e27933c6f05150d058480e7cee78dd5 to your computer and use it in GitHub Desktop.
シンプルRPGチュートリアル第78回 メニュー画面全体を管理するクラス
/// <summary>
/// 選択されたメニューに応じた処理を呼び出します。
/// </summary>
void HandleMenu()
{
switch (SelectedMenu)
{
case MenuCommand.Item:
case MenuCommand.Magic:
ShowItemMenu();
break;
case MenuCommand.Equipment:
ShowEquipmentMenu();
break;
case MenuCommand.Status:
ShowStatusMenu();
break;
case MenuCommand.Save:
ShowSaveMenu();
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