acdream/src/AcDream.App/Rendering/LiveEntityPartArrayLifecycle.cs
Erik e91f310279 refactor(update): cut over the frame orchestrator
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.
2026-07-22 03:31:38 +02:00

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();
}
}