Skip to content

Instantly share code, notes, and snippets.

@todorok1
Created March 26, 2025 07:35
Show Gist options
  • Select an option

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

Select an option

Save todorok1/12412e0a3b8460e4de2a455ad9d8bcf9 to your computer and use it in GitHub Desktop.
シンプルRPGチュートリアル第53回 戦闘に関する機能を管理するクラス
/// <summary>
/// メッセージウィンドウでメッセージの表示が完了した時のコールバックです。
/// </summary>
public void OnFinishedShowMessage()
{
switch (BattlePhase)
{
case BattlePhase.ShowEnemy:
SimpleLogger.Instance.Log("敵の表示が完了しました。");
StartInputCommandPhase();
break;
case BattlePhase.Action:
_battleActionProcessor.ShowNextMessage();
break;
}
}
/// <summary>
/// ターン内の行動が完了した時のコールバックです。
/// </summary>
public void OnFinishedActions()
{
if (IsBattleFinished)
{
SimpleLogger.Instance.Log("OnFinishedActions() || 戦闘が終了しているため、処理を中断します。");
return;
}
SimpleLogger.Instance.Log("ターン内の行動が完了しました。");
TurnCount++;
StartInputCommandPhase();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment