Core/EnttWorld: Add RemoveSystem method

This commit is contained in:
SirLynix
2023-07-27 15:09:15 +02:00
parent 99471e8e65
commit a101f7c71f
4 changed files with 22 additions and 0 deletions

View File

@@ -71,6 +71,18 @@ namespace Nz
auto& node = static_cast<Node<T>&>(*m_nodes[it->second]);
return node.system;
}
template<typename T>
void EnttSystemGraph::RemoveSystem()
{
auto it = m_systemToNodes.find(entt::type_hash<T>());
if (it == m_systemToNodes.end())
return;
m_nodes.erase(m_nodes.begin() + it->second);
m_systemToNodes.erase(it);
m_systemOrderUpdated = false;
}
}
#include <Nazara/Core/DebugOff.hpp>