10#include "galaxy/core/ServiceLocator.hpp"
21 auto& lua = core::ServiceLocator<sol::state>::ref();
23 auto map_type = lua.new_usertype<
map::Map>(
"Map", sol::constructors<map::Map()>());
28 auto world_type = lua.new_usertype<
map::World>(
"World", sol::constructors<map::World()>());
core::Registry m_registry
Map entities.
void load(const ldtk::Level &level)
Load a map from an ldtk level.
const std::string & name() const
Get map name.
bool load(const std::string &file)
Load a world.
const std::string & name() const
Get world name.
void set_active(const std::string &map)
Set currently active map.
bool loaded() const
Check if load() was called.
map::Map * get_active() const
Get currently active map.
void parse()
Parse world and create entities.
const std::string & file() const
Get file.
void clear()
Clear all map and world data.
void inject_map()
Injects mapping into Lua.