Skip to content

Commit

Permalink
fix(unit): game loop imitation
Browse files Browse the repository at this point in the history
- Code clean-up
  • Loading branch information
cherrynik committed Feb 28, 2024
1 parent aa2a23d commit 25a65f9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ private static void RegisterEntryPoint(IServiceRegistry serviceRegistry)
var movement = new Feature(factory.GetInstance<World>(), factory.GetInstance<SystemsEngine>(),
new InputSystem(factory.GetInstance<World>(), new KeyboardInput()),
new CollisionSystem(factory.GetInstance<World>()),
new MovementSystem(factory.GetInstance<World>(), new SimpleMovement())
);
new MovementSystem(factory.GetInstance<World>(), new SimpleMovement()));

var preRender = new Feature(factory.GetInstance<World>(),
factory.GetInstance<SystemsEngine>(),
Expand Down
2 changes: 1 addition & 1 deletion src/Libs/External/MonoGame.ImGuiNet
3 changes: 2 additions & 1 deletion src/UnitTests/UnitTests.Entities/PlayerEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ public void WorldSystemAndEntityWorkTogether()
new TransformComponent())));

rootFeature.OnAwake();

rootFeature.OnFixedUpdate(It.IsAny<float>());
rootFeature.OnUpdate(It.IsAny<float>());
rootFeature.OnLateUpdate(It.IsAny<float>());

mockInputScanner.Verify(p => p.GetDirection(), Times.Once);
}
Expand Down

0 comments on commit 25a65f9

Please sign in to comment.