Enabled for entities is now a friend of ECS::World

This commit is contained in:
2026-01-30 15:58:13 +02:00
parent d21bc60024
commit cd59ed656a
2 changed files with 5 additions and 6 deletions

View File

@@ -9,8 +9,9 @@
#include <Systems/ECS.hpp>
#include <Systems/ECS/BuiltinComponents.hpp>
#include <utility>
bool Tourmaline::Systems::Components::Enabled::isEnabled() { return enabled; }
void Tourmaline::Systems::Components::Enabled::setEnabled(bool enable) {
ownerWorld->entitiesToDisable.push_back({this, enable});
ownerWorld->entitiesToDisable.emplace(std::pair{this, enable});
}