8#ifndef GALAXY_SCENE_SCENE_HPP_
9#define GALAXY_SCENE_SCENE_HPP_
11#include <entt/signal/dispatcher.hpp>
13#include <SDL3/SDL_events.h>
116 void only_update_rendering();
126bool load_world(const std::string& file);
133nlohmann::json serialize() override;
140void deserialize(const nlohmann::json& json) override;
144graphics::Camera m_camera;
160int m_velocity_iterations;
165int m_position_iterations;
170 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.
Scene & operator=(const Scene &)=delete
Copy assignment operator.
void update(EntityManager &em)
Process events and updates.
void on_pop() override
When scene is popped from the stack.
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.
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.