8#ifndef GALAXY_SCENE_SCENE_HPP_
9#define GALAXY_SCENE_SCENE_HPP_
11#include <ankerl/unordered_dense.h>
14#include "galaxy/fs/Serializable.hpp"
28 class Scene final :
public fs::Serializable
83 const std::string&
name() const noexcept;
120 graphics::Camera m_camera;
125 entt::dispatcher m_dispatcher;
140 int m_velocity_iterations;
145 int m_position_iterations;*/
Wrapper around entt::registry to expand functionality.
Represents a scene in a game. Like the menu, game, etc. Does not share resources.
void add_system(const std::string &system)
Add a system to operate on entities in this scene.
void load()
When scene is loaded and made active.
virtual ~Scene()
Destructor.
const std::string & name() const noexcept
Get scene name.
meta::SystemStack m_systems
List of systems to run.
virtual void update()
Process events and updates.
std::string m_name
Scene name for debug purposes.
nlohmann::json serialize() override
Serializes object.
Scene(const std::string &name)
Name constructor.
void deserialize(const nlohmann::json &json) override
Deserializes from object.
void unload()
When scene is deactivated / unloaded.