Skip to content

Instantly share code, notes, and snippets.

@todorok1
Created August 26, 2025 08:27
Show Gist options
  • Select an option

  • Save todorok1/8c04da07fdb0b83c121a61609659a1d6 to your computer and use it in GitHub Desktop.

Select an option

Save todorok1/8c04da07fdb0b83c121a61609659a1d6 to your computer and use it in GitHub Desktop.
シンプルRPGチュートリアル第126回 メニューウィンドウで魔法の使用処理を制御するクラス
/// <summary>
/// 回復魔法のメッセージを表示します。
/// </summary>
IEnumerator ShowMagicHealMessage(int characterId, string magicName, int healValue)
{
var characterName = CharacterDataManager.GetCharacterName(characterId);
string actorName = characterName;
string targetName = characterName;
_mapMessageWindowController.SetUpController(_windowController);
_mapMessageWindowController.HidePager();
_mapMessageWindowController.ShowWindow();
_windowController.SetCanSelectState(false);
_windowController.SetPauseMessageState(true);
_mapMessageWindowController.GenerateMagicCastMessage(actorName, magicName);
while (_windowController.IsPausedMessage)
{
yield return null;
}
// 回復の効果音を再生します。
AudioManager.Instance.PlaySe(SeNames.Heal);
_windowController.SetPauseMessageState(true);
_mapMessageWindowController.GenerateHpHealMessage(targetName, healValue);
_windowController.UpdateStatus();
while (_windowController.IsPausedMessage)
{
yield return null;
}
// キー入力を待ちます。
_mapMessageWindowController.StartKeyWait();
while (_mapMessageWindowController.IsWaitingKeyInput)
{
yield return null;
}
_pauseMagicEffect = false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment