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:
Erik 2026-07-26 19:06:09 +02:00
parent ecb9f79444
commit ce41efb9e5
29 changed files with 613 additions and 778 deletions

View file

@ -1,5 +1,6 @@
using AcDream.Core.Physics;
using AcDream.App.Physics;
using AcDream.Runtime.Gameplay;
namespace AcDream.App.Input;
@ -13,7 +14,23 @@ internal interface ILocalPlayerIdentitySource
/// </summary>
internal sealed class LocalPlayerIdentityState : ILocalPlayerIdentitySource
{
public uint ServerGuid { get; set; }
private readonly RuntimeLocalPlayerIdentityState _runtime;
public LocalPlayerIdentityState()
: this(new RuntimeLocalPlayerIdentityState())
{
}
public LocalPlayerIdentityState(RuntimeLocalPlayerIdentityState runtime)
{
_runtime = runtime ?? throw new ArgumentNullException(nameof(runtime));
}
public uint ServerGuid
{
get => _runtime.ServerGuid;
set => _runtime.ServerGuid = value;
}
}
internal interface ILocalPlayerPhysicsHostSource