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:
committed by
Jérôme Leclercq
parent
d5f281a768
commit
97fa4d98be
@@ -9,6 +9,7 @@ namespace Nz
|
||||
{
|
||||
void AppEntitySystemComponent::Update(Time elapsedTime)
|
||||
{
|
||||
m_systemGraph.Update(elapsedTime);
|
||||
for (auto& worldPtr : m_worlds)
|
||||
worldPtr->Update(elapsedTime);
|
||||
}
|
||||
}
|
||||
|
||||
11
src/Nazara/Core/EntityWorld.cpp
Normal file
11
src/Nazara/Core/EntityWorld.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
// 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/EntityWorld.hpp>
|
||||
#include <Nazara/Core/Debug.hpp>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
EntityWorld::~EntityWorld() = default;
|
||||
}
|
||||
@@ -2,19 +2,19 @@
|
||||
// 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/EnttSystemGraph.hpp>
|
||||
#include <Nazara/Core/Debug.hpp>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
SystemGraph::NodeBase::~NodeBase() = default;
|
||||
EnttSystemGraph::NodeBase::~NodeBase() = default;
|
||||
|
||||
void SystemGraph::Update()
|
||||
void EnttSystemGraph::Update()
|
||||
{
|
||||
return Update(m_clock.Restart());
|
||||
}
|
||||
|
||||
void SystemGraph::Update(Time elapsedTime)
|
||||
void EnttSystemGraph::Update(Time elapsedTime)
|
||||
{
|
||||
if (!m_systemOrderUpdated)
|
||||
{
|
||||
14
src/Nazara/Core/EnttWorld.cpp
Normal file
14
src/Nazara/Core/EnttWorld.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
// 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/EnttWorld.hpp>
|
||||
#include <Nazara/Core/Debug.hpp>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
void EnttWorld::Update(Time elapsedTime)
|
||||
{
|
||||
m_systemGraph.Update(elapsedTime);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user