8#include <entt/locator/locator.hpp>
23 auto& lua = entt::locator<sol::state>::value();
25 auto scene_type = lua.new_usertype<
Scene>(
"Scene", sol::no_constructor);
32 auto world_type = lua.new_usertype<
World>(
"World", sol::no_constructor);
33 world_type[
"add"] = [](
World& self,
const std::string& key) {
static void inject_scene() noexcept
Injects galaxy scene management into lua.
Represents a scene in a game.
void on_push() override
When scene is pushed to the stack.
void on_pop() override
When scene is popped from the stack.
void clear()
Remove all scene data.
void add_system(const std::string &system)
Add a system to operate on entities in this scene.
std::shared_ptr< Stored > add(const std::string &key, Args &&... args)
Add a new state.
void remove(const std::string &key)
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.
Scene, Entity and global game management.
void clear()
Removes all data.
void add_wrapper(const std::string &key)