Add system graph (wip)

This commit is contained in:
SirLynix
2022-07-02 19:45:50 +02:00
parent 4d24be2ae9
commit 1b678defae
18 changed files with 524 additions and 286 deletions

View File

@@ -35,12 +35,12 @@ namespace Nz
m_constructConnection.release();
}
void Physics2DSystem::Update(entt::registry& registry, float elapsedTime)
void Physics2DSystem::Update(float elapsedTime)
{
m_physWorld.Step(elapsedTime);
// Replicate rigid body position to their node components
auto view = registry.view<NodeComponent, const RigidBody2DComponent>();
auto view = m_registry.view<NodeComponent, const RigidBody2DComponent>();
for (auto [entity, nodeComponent, rigidBodyComponent] : view.each())
{
if (rigidBodyComponent.IsSleeping())