29 lines
3.6 KiB
Plaintext
29 lines
3.6 KiB
Plaintext
|
|
<!DOCTYPE html>
|
|||
|
|
<html lang="en"><head>
|
|||
|
|
<meta charset="UTF-8">
|
|||
|
|
<title>Simulation — Unity-Roject-Test</title>
|
|||
|
|
<style>
|
|||
|
|
@import url('/fonts/barlow.css');
|
|||
|
|
</style>
|
|||
|
|
</head>
|
|||
|
|
<body data-theme="default-roject">
|
|||
|
|
<page--header></page--header>
|
|||
|
|
|
|||
|
|
<page--root data-theme="default-roject">
|
|||
|
|
<full--width--block data--page--block="">
|
|||
|
|
<full--width--area data--page--area="" contenteditable="true" spellcheck="false" autocorrect="off" autocapitalize="off" style="outline: none;"><h1>Simulation</h1><div><marked-text>Assets/Scripts/Rokojori/Simulation</marked-text> - the turn loop that drives GamePhases. The least finished of the three systems - see <a href="../../outline/tech/index.page">outline/tech/index.page</a> for what's still missing.</div></full--width--area>
|
|||
|
|
</full--width--block>
|
|||
|
|
<two--columns--block data--page--block="">
|
|||
|
|
<two--columns--area data--page--area="" contenteditable="true" spellcheck="false" autocorrect="off" autocapitalize="off" style="outline: none;"><h2>The Turn Loop</h2><div><code>SimulationManager.Run()</code>:</div><div>intro → while not finished: preTurn → playerTurn ×playerCount → postTurn → (loop) → outro.</div><div><br></div><div>Each list is run by <code>RunPhases()</code>, which executes phases in order and checks <code>phase.gameFinished</code> after each one. If any phase sets it, <code>RunPhases</code> returns immediately (skipping the rest of <marked-text>that</marked-text> list) and <code>Run()</code> skips straight to <code>outro</code> instead of continuing the while-loop.</div></two--columns--area>
|
|||
|
|
<two--columns--area data--page--area="" contenteditable="true" spellcheck="false" autocorrect="off" autocapitalize="off" style="outline: none;"><h2>playerCount Is a Placeholder</h2><div>There is no <code>Player</code> type anywhere in the codebase yet. <code>SimulationManager.playerCount</code> is a plain <code>int</code> defaulting to 1 - nothing currently sets it automatically. An intro phase is expected to set it (e.g. from a GameState variable) before the turn loop needs it, but that phase doesn't exist yet either.</div><div><br></div><h2>GamePhase</h2><div>Abstract ScriptableObject. <code>Execute( GameStateManager, SimulationRenderer )</code> does the work; set <code>gameFinished = true</code> from inside it to end the game early. No concrete example phases exist yet (ShowTurnStartConditions / SimulateWorld were only described narratively in the outline, no code contract given).</div></two--columns--area>
|
|||
|
|
</two--columns--block>
|
|||
|
|
<two--columns--block data--page--block="">
|
|||
|
|
<two--columns--area data--page--area="" contenteditable="true" spellcheck="false" autocorrect="off" autocapitalize="off" style="outline: none;"><h2>SimulationRenderer / SimulationCommand - Stubs</h2><div><code>SimulationRenderer.Enqueue( command )</code> currently just returns <code>Task.CompletedTask</code> immediately - there's no rendering/animation pipeline behind it. <code>SimulationCommand</code> is an empty abstract base with no concrete commands defined. A GamePhase can call <code>Enqueue</code> today and it will compile and "work" (complete instantly), but nothing will actually happen on screen.</div></two--columns--area>
|
|||
|
|
<two--columns--area data--page--area="" contenteditable="true" spellcheck="false" autocorrect="off" autocapitalize="off" style="outline: none;"><h2>DialogPhase</h2><div>Lives here, not in Dialog/, because it's a GamePhase, not part of the dialog engine itself. Just awaits <code>DialogManager.instance.StartDialog( start )</code> - all real logic stays in Dialog/.</div></two--columns--area>
|
|||
|
|
</two--columns--block>
|
|||
|
|
</page--root>
|
|||
|
|
|
|||
|
|
<page--footer></page--footer>
|
|||
|
|
|
|||
|
|
</body></html>
|