8#include <entt/locator/locator.hpp>
20 auto& lua = entt::locator<sol::state>::value();
22 auto scene_type = lua.new_usertype<
Scene>(
"Scene", sol::no_constructor);
30 auto sm_type = lua.new_usertype<
SceneManager>(
"SceneManager", sol::no_constructor);
31 sm_type[
"add"] = [](
SceneManager& self,
const std::string& key) {
static void inject_scene() noexcept
Injects galaxy scene management into lua.
State machine for managing scenes.
void update()
Process events and updates.
void clear()
Removes all data.
void render()
Render scenes.
Represents a scene in a game.
void on_push() override
When scene is pushed to the stack.
void update(EntityManager &em)
Process events and updates.
void on_pop() override
When scene is popped from the stack.
void render()
Render scene.
SystemManager & sys_man() noexcept
Get system manager.
void remove(const std::string &key)
std::shared_ptr< Stored > add(const std::string &key, Args &&... args)
Add a new state.
bool has(const std::string &key) noexcept
std::shared_ptr< Stored > get(const std::string &key) noexcept
void push(const std::string &key) noexcept
std::shared_ptr< Stored > top() const noexcept
const std::string & name() const noexcept
Get state name.