refactor(runtime): close simulation ownership
Move remote-motion construction, CreateObject vector initialization, final simulation-component retirement, and the combined J5 ownership ledger into Runtime. Delete App compatibility views and moved-state reconstruction while preserving the existing graphical projection and retail update order.
This commit is contained in:
parent
c30a3efeb0
commit
cdee7a4b49
57 changed files with 1013 additions and 410 deletions
|
|
@ -133,36 +133,3 @@ public sealed class LiveEntityAnimationRuntimeView<TAnimation>
|
|||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Storage-free typed view over remote-motion components.</summary>
|
||||
public sealed class LiveEntityRemoteMotionRuntimeView<TRemoteMotion>
|
||||
where TRemoteMotion : class, ILiveEntityRemoteMotionRuntime
|
||||
{
|
||||
private readonly ILiveEntityRuntimeSource _runtime;
|
||||
|
||||
internal LiveEntityRemoteMotionRuntimeView(ILiveEntityRuntimeSource runtime) =>
|
||||
_runtime = runtime ?? throw new ArgumentNullException(nameof(runtime));
|
||||
|
||||
public TRemoteMotion this[uint serverGuid]
|
||||
{
|
||||
set => (_runtime.Current
|
||||
?? throw new InvalidOperationException("Live entity runtime is not initialized."))
|
||||
.SetRemoteMotionRuntime(serverGuid, value);
|
||||
}
|
||||
|
||||
public bool TryGetValue(uint serverGuid, out TRemoteMotion motion)
|
||||
{
|
||||
if (_runtime.Current?.TryGetRemoteMotionRuntime(serverGuid, out var found) == true
|
||||
&& found is TRemoteMotion typed)
|
||||
{
|
||||
motion = typed;
|
||||
return true;
|
||||
}
|
||||
|
||||
motion = null!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool Remove(uint serverGuid) =>
|
||||
_runtime.Current?.ClearRemoteMotionRuntime(serverGuid) == true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue