Skip to content

Instantly share code, notes, and snippets.

@todorok1
Created March 28, 2025 12:41
Show Gist options
  • Save todorok1/f83e16878c4b33dc9987caaedfff27a6 to your computer and use it in GitHub Desktop.
Save todorok1/f83e16878c4b33dc9987caaedfff27a6 to your computer and use it in GitHub Desktop.
シンプルRPGチュートリアル第60回 戦闘に関する機能を管理するクラス
/// <summary>
/// 戦闘の開始処理を行います。
/// </summary>
public void StartBattle()
{
SimpleLogger.Instance.Log("戦闘を開始します。");
GameStateManager.ChangeToBattle();
SetBattlePhase(BattlePhase.ShowEnemy);
TurnCount = 1;
IsBattleFinished = false;
_battleWindowManager.SetUpWindowControllers(this);
var messageWindowController = _battleWindowManager.GetMessageWindowController();
messageWindowController.HidePager();
_battleActionProcessor.InitializeProcessor(this);
_battleActionRegister.InitializeRegister(_battleActionProcessor);
_enemyCommandSelector.SetReferences(this, _battleActionRegister);
_battleResultManager.SetReferences(this);
_characterMoverManager.StopCharacterMover();
_battleStarter.StartBattle(this);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment