8#ifndef GALAXY_SCENE_SCENE_HPP_
9#define GALAXY_SCENE_SCENE_HPP_
11#include <entt/signal/dispatcher.hpp>
12#include <nlohmann/json_fwd.hpp>
13#include <SDL3/SDL_events.h>
56 virtual void on_event(SDL_Event& event);
131 void only_update_rendering();
141bool load_world(const std::string& file);
148nlohmann::json serialize() override;
155void deserialize(const nlohmann::json& json) override;
159graphics::Camera m_camera;
175int m_velocity_iterations;
180int m_position_iterations;
185 std::size_t m_rendersystem_index;
Class for making creating and managing entities easier.
Represents a scene in a game.
void on_push() override
When scene is pushed to the stack.
Scene(const Scene &)=delete
Copy constructor.
virtual ~Scene() noexcept
Destructor.
void deserialize(const nlohmann::json &json)
Deserializes from object.
Scene & operator=(const Scene &)=delete
Copy assignment operator.
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.
entt::dispatcher m_dispatcher
Scene event handler.
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.
const std::string & name() const noexcept
Get state name.
Manages the systems assigned to it.