Skip to content

Commit

Permalink
zzre: Fix ScrNotification upon starting in ZanzarahWindow
Browse files Browse the repository at this point in the history
  • Loading branch information
Helco committed Jan 27, 2024
1 parent 7f067f2 commit 6d8416e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion zzre/game/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class Game : BaseDisposable, ITagContainer
private readonly GameTime time;
private readonly DefaultEcs.World ecsWorld;
private readonly Camera camera;
private readonly OnceAction onceUpdate = new();
private readonly ISystem<float> updateSystems;
private readonly ISystem<CommandList> renderSystems;
private readonly systems.SyncedLocation syncedLocation;
Expand Down Expand Up @@ -156,7 +157,7 @@ public Game(ITagContainer diContainer, Savegame savegame)
//camera.Location.LocalPosition = -worldBuffers.Origin;
ecsWorld.Set(worldLocation);

LoadOverworldScene(savegame.sceneId, () => FindEntryTrigger(savegame.entryId));
onceUpdate.Next += () => LoadOverworldScene(savegame.sceneId, () => FindEntryTrigger(savegame.entryId));
}

protected override void DisposeManaged()
Expand All @@ -178,6 +179,7 @@ private void HandleResize()

public void Update()
{
onceUpdate.Invoke();
updateSystems.Update(time.Delta);
}

Expand Down

0 comments on commit 6d8416e

Please sign in to comment.