Rework EnTT integration

- Update EnTT to 3.11.1
- Moved EnTT wrapper to EnTTWorld, inheriting EntityWorld
- AppEntitySystemComponent can now handles multiple EntityWorld
- Headers relying on EnTT are now automatically included if NAZARA_ENTT is defined
- Renamed SystemGraph to EnttSystemGraph (as it depends on it for now)
This commit is contained in:
SirLynix
2023-01-28 18:16:10 +01:00
committed by Jérôme Leclercq
parent d5f281a768
commit 97fa4d98be
52 changed files with 361 additions and 191 deletions

View File

@@ -1,37 +0,0 @@
// Copyright (C) 2023 Jérôme "Lynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Core module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Core/Systems/SystemGraph.hpp>
#include <Nazara/Core/Debug.hpp>
namespace Nz
{
SystemGraph::NodeBase::~NodeBase() = default;
void SystemGraph::Update()
{
return Update(m_clock.Restart());
}
void SystemGraph::Update(Time elapsedTime)
{
if (!m_systemOrderUpdated)
{
m_orderedNodes.clear();
m_orderedNodes.reserve(m_nodes.size());
for (auto& nodePtr : m_nodes)
m_orderedNodes.emplace_back(nodePtr.get());
std::sort(m_orderedNodes.begin(), m_orderedNodes.end(), [](const NodeBase* a, const NodeBase* b)
{
return a->executionOrder < b->executionOrder;
});
m_systemOrderUpdated = true;
}
for (NodeBase* node : m_orderedNodes)
node->Update(elapsedTime);
}
}