Skip to content

Instantly share code, notes, and snippets.

@todorok1
Last active August 13, 2025 09:48
Show Gist options
  • Select an option

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

Select an option

Save todorok1/d2c9edff981fc574c69c85f76eff20ce to your computer and use it in GitHub Desktop.
シンプルRPGチュートリアル第116回 戦闘中の魔法アクションを処理するクラス
/// <summary>
/// 回復魔法のメッセージを表示します。
/// </summary>
IEnumerator ShowMagicHealMessage(BattleAction action, string magicName, int healValue)
{
string actorName = _actionProcessor.GetCharacterName(action.actorId, action.isActorFriend);
string targetName = _actionProcessor.GetCharacterName(action.targetId, action.isTargetFriend);
_actionProcessor.SetPauseMessage(true);
_messageWindowController.GenerateMagicCastMessage(actorName, magicName);
while (_actionProcessor.IsPausedMessage)
{
yield return null;
}
// 回復の効果音を再生します。
AudioManager.Instance.PlaySe(SeNames.Heal);
_actionProcessor.SetPauseMessage(true);
_messageWindowController.GenerateHpHealMessage(targetName, healValue);
_battleManager.OnUpdateStatus();
while (_actionProcessor.IsPausedMessage)
{
yield return null;
}
_pauseMagicEffect = false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment