namespace AcDream.Core.Physics; /// /// Executes the manager tail of retail /// CPhysicsObj::UpdateObjectInternal (0x005156B0). /// /// /// The order is observable. In particular, animation completion hooks have /// already run when this tail begins, so MoveTo may react to a completion in /// the same object quantum. A null callback represents an absent retail /// manager; it is not a separate execution path. /// public static class RetailObjectManagerTail { /// /// Allocation-free production overload for the concrete retail manager /// owners. DetectionManager is not ported, so its ordered slot is empty. /// public static void Run( Motion.TargetManager? target, Motion.MovementManager? movement, Motion.MotionTableManager? partArray, Motion.PositionManager? position) { target?.HandleTargetting(); movement?.UseTime(); partArray?.UseTime(); position?.UseTime(); } /// /// Allocation-free local-player overload. Its target action and PartArray /// completion action are cached ownership seams; the other managers are /// passed as concrete objects rather than allocating bound delegates per /// quantum. /// public static void Run( Action? handleTargeting, Motion.MovementManager? movement, Action? partArrayHandleMovement, Motion.PositionManager? position) { handleTargeting?.Invoke(); movement?.UseTime(); partArrayHandleMovement?.Invoke(); position?.UseTime(); } public static void Run( Action? checkDetection, Action? handleTargeting, Action? movementUseTime, Action? partArrayHandleMovement, Action? positionUseTime) { checkDetection?.Invoke(); handleTargeting?.Invoke(); movementUseTime?.Invoke(); partArrayHandleMovement?.Invoke(); positionUseTime?.Invoke(); } }