refactor(runtime): own world environment state
This commit is contained in:
parent
b972f539f7
commit
902076c0a4
27 changed files with 886 additions and 295 deletions
|
|
@ -116,8 +116,7 @@ public sealed class GameWindow :
|
|||
_renderResourceLifetime = new();
|
||||
private readonly AcDream.App.Rendering.GlConstructionCleanupLedger
|
||||
_glConstructionCleanup = new();
|
||||
private readonly AcDream.App.World.WorldEnvironmentController _worldEnvironment =
|
||||
new(Console.WriteLine);
|
||||
private readonly AcDream.App.World.WorldEnvironmentController _worldEnvironment;
|
||||
private readonly GameWindowLifetime _lifetime = new();
|
||||
private readonly DisplayFramePacingController _displayFramePacing;
|
||||
private readonly RuntimeSettingsController _runtimeSettings;
|
||||
|
|
@ -566,6 +565,13 @@ public sealed class GameWindow :
|
|||
AcDream.App.Plugins.BufferedUiRegistry? uiRegistry = null)
|
||||
{
|
||||
_options = options ?? throw new System.ArgumentNullException(nameof(options));
|
||||
_worldEnvironment = new AcDream.App.World.WorldEnvironmentController(
|
||||
new AcDream.Runtime.World.RuntimeWorldEnvironmentState(
|
||||
log: Console.WriteLine,
|
||||
timeSyncDiagnostic:
|
||||
options.DumpSky ? Console.WriteLine : null),
|
||||
options.ForcedDayGroupIndex,
|
||||
Console.WriteLine);
|
||||
_runtimeInventory = new RuntimeInventoryState(_runtimeEntityObjects);
|
||||
_runtimeCharacter = new RuntimeCharacterState();
|
||||
_runtimeActions = new RuntimeActionState(
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ internal sealed class RuntimeRenderFrameTitleFactsSource : IRenderFrameTitleFact
|
|||
public RenderFrameTitleFacts Capture() => new(
|
||||
_world.Entities.Count,
|
||||
_animations.Count,
|
||||
DerethDateTime.ToCalendar(_time.NowTicks),
|
||||
_time.CurrentCalendar,
|
||||
_time.DayFraction);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue