refactor(runtime): cut graphical host over to canonical root
Make every App composition phase borrow one GameRuntime, retire the duplicate view/event adapters, and dispose the root only after its graphical borrowers release. This preserves synchronous UI commands while giving shutdown one exact ownership ledger. Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
parent
ecb9f79444
commit
ce41efb9e5
29 changed files with 613 additions and 778 deletions
|
|
@ -31,7 +31,17 @@ internal sealed class UpdateFrameClock
|
|||
: IPhysicsScriptTimeSource,
|
||||
IGameRuntimeClock
|
||||
{
|
||||
private readonly GameRuntimeClock _runtime = new();
|
||||
private readonly GameRuntimeClock _runtime;
|
||||
|
||||
public UpdateFrameClock()
|
||||
: this(new GameRuntimeClock())
|
||||
{
|
||||
}
|
||||
|
||||
public UpdateFrameClock(GameRuntimeClock runtime)
|
||||
{
|
||||
_runtime = runtime ?? throw new ArgumentNullException(nameof(runtime));
|
||||
}
|
||||
|
||||
public ulong FrameNumber => _runtime.FrameNumber;
|
||||
public double SimulationTimeSeconds => _runtime.SimulationTimeSeconds;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue