8#include <entt/locator/locator.hpp>
9#include <nlohmann/json.hpp>
53 if (entt::locator<sol::state>::has_value())
55 entt::locator<sol::state>::value().collect_garbage();
296 nlohmann::json json =
"{}"_json;
Class for making creating and managing entities easier.
void on_push() override
When scene is pushed to the stack.
virtual ~Scene() noexcept
Destructor.
void deserialize(const nlohmann::json &json)
Deserializes from object.
virtual void update(EntityManager &em)
Process events and updates.
void on_pop() override
When scene is popped from the stack.
virtual void on_event(SDL_Event &event)
Handle an event for a scene.
SystemManager m_sysman
Systems only used by this scene.
nlohmann::json serialize()
Serializes object.
virtual void render()
Render scene.
SystemManager & sys_man() noexcept
Get system manager.
Scene()=delete
Constructor.
A state to use in a finite state machine.
Manages the systems assigned to it.
void update(EntityManager &em, Scene *scene)
Process all systems.