refactor(runtime): define the update-frame contract

This commit is contained in:
Erik 2026-07-22 00:15:27 +02:00
parent a36a7015c4
commit 99a3e819c4
8 changed files with 646 additions and 26 deletions

View file

@ -2,6 +2,7 @@ using System.Numerics;
using AcDream.App.Physics;
using AcDream.App.Rendering.Vfx;
using AcDream.App.Rendering.Wb;
using AcDream.App.Update;
using AcDream.App.World;
using AcDream.Content;
using AcDream.Core.Meshing;
@ -44,7 +45,7 @@ internal sealed class DatLiveEntityProjectionMaterializer
private readonly LiveEntityAnimationPresenter _animationPresenter;
private readonly RetailStaticAnimatingObjectScheduler _staticAnimations;
private readonly LiveWorldOriginState _origin;
private readonly Func<double> _gameTime;
private readonly IPhysicsScriptTimeSource _gameTime;
private int _received;
private int _hydrated;
@ -76,7 +77,7 @@ internal sealed class DatLiveEntityProjectionMaterializer
LiveEntityAnimationPresenter animationPresenter,
RetailStaticAnimatingObjectScheduler staticAnimations,
LiveWorldOriginState origin,
Func<double> gameTime)
IPhysicsScriptTimeSource gameTime)
{
_options = options ?? throw new ArgumentNullException(nameof(options));
_dats = dats ?? throw new ArgumentNullException(nameof(dats));
@ -791,7 +792,7 @@ internal sealed class DatLiveEntityProjectionMaterializer
_projectiles.TryBind(
expectedRecord,
setup,
_gameTime(),
_gameTime.CurrentScriptTime,
_origin.CenterX,
_origin.CenterY);