Reduce GameWindow.OnUpdate to one typed orchestration call and remove transitive window callbacks from teardown, liveness, teleport placement, live presentation, auto-entry, and entity packet routing. Preserve the frozen retail object/network order while making the production owner graph explicit and testable.
19 lines
733 B
C#
19 lines
733 B
C#
using AcDream.App.World;
|
|
|
|
namespace AcDream.App.Rendering;
|
|
|
|
/// <summary>Routes retail PartArray world-entry boundaries to live animation owners.</summary>
|
|
internal sealed class LiveEntityPartArrayLifecycle
|
|
{
|
|
private readonly LiveEntityAnimationRuntimeView<LiveEntityAnimationState> _animations;
|
|
|
|
public LiveEntityPartArrayLifecycle(
|
|
LiveEntityAnimationRuntimeView<LiveEntityAnimationState> animations) =>
|
|
_animations = animations ?? throw new ArgumentNullException(nameof(animations));
|
|
|
|
public void HandleEnterWorld(uint localEntityId)
|
|
{
|
|
if (_animations.TryGetValue(localEntityId, out LiveEntityAnimationState? animation))
|
|
animation.Sequencer?.Manager.HandleEnterWorld();
|
|
}
|
|
}
|