8#include <entt/locator/locator.hpp>
19 auto& lua = entt::locator<sol::state>::value();
21 auto scene_type = lua.new_usertype<
scene::Scene>(
"Scene", sol::no_constructor);
29 auto scenemanager_type = lua.new_usertype<
scene::SceneManager>(
"SceneManager", sol::no_constructor);
Scene saving/loading, pushing, popping, creating. Also manages entities.
void save_app(const std::string &file)
Save all active scenes and sub data within those scenes.
bool empty() const noexcept
Are there any scenes.
std::shared_ptr< Scene > top() noexcept
Get top scene.
void pop()
Remove scene on top of stack.
void set(const std::string &scene)
Clears all from stack and sets as active.
std::shared_ptr< Scene > create(const std::string &scene)
Create scene in engine.
void clear()
Deletes all scene data.
void update()
Process events and updates.
void render()
Render scenes.
void pop_all()
Pop all scenes.
void load_app(const std::string &appdata_file)
Load app data file into scene manager.
void push(const std::string &scene)
Push a scene onto the top of stack.
Represents a scene in a game. Like the menu, game, etc.
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.
const std::string & name() const noexcept
Get scene name.
void update(core::Registry ®istry)
Process events and updates.
void unload()
When scene is deactivated / unloaded.
void inject_scene_control()
Injects galaxy scene management into lua.