galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
LuaServices.cpp
Go to the documentation of this file.
1
7
8#include <entt/signal/dispatcher.hpp>
9#include <entt/locator/locator.hpp>
10#include <sol/sol.hpp>
11
15
16namespace galaxy
17{
18 namespace lua
19 {
21 {
22 auto& lua = entt::locator<sol::state>::value();
23
24 // logging
25 // thread_pool
26 lua["galaxy_config"] = std::ref(entt::locator<core::Config>::value());
27 lua["galaxy_fs"] = std::ref(entt::locator<fs::VirtualFileSystem>::value());
28 // render window
29 lua["galaxy_dispatcher"] = std::ref(entt::locator<entt::dispatcher>::value());
30 // system factory
31 // entity factory
32 // lua state
33 lua["galaxy_scenes"] = std::ref(entt::locator<scene::SceneManager>::value());
34
35 /*lua["galaxy_nui"] = std::ref(entt::locator<ui::NuklearUI>::value());
36 lua["galaxy_entitymeta"] = std::ref(entt::locator<meta::EntityMeta>::value());
37 lua["galaxy_soundengine"] = std::ref(entt::locator<media::SoundEngine>::value());
38 lua["galaxy_voiceengine"] = std::ref(entt::locator<media::VoiceEngine>::value());
39 lua["galaxy_musicengine"] = std::ref(entt::locator<media::MusicEngine>::value());
40 lua["galaxy_animations"] = std::ref(entt::locator<resource::Animations>::value());
41 lua["galaxy_sounds"] = std::ref(entt::locator<resource::SoundCache>::value());
42 lua["galaxy_music"] = std::ref(entt::locator<resource::MusicCache>::value());
43 lua["galaxy_voice"] = std::ref(entt::locator<resource::VoiceCache>::value());
44 lua["galaxy_videos"] = std::ref(entt::locator<resource::VideoCache>::value());
45 lua["galaxy_shaders"] = std::ref(entt::locator<resource::Shaders>::value());
46 lua["galaxy_fonts"] = std::ref(entt::locator<resource::Fonts>::value());
47 lua["galaxy_textures"] = std::ref(entt::locator<resource::Textures>::value());
48 lua["galaxy_prefabs"] = std::ref(entt::locator<resource::Prefabs>::value());
49 lua["galaxy_scripts"] = std::ref(entt::locator<resource::Scripts>::value());
50 lua["galaxy_fontcontext"] = std::ref(entt::locator<graphics::FontContext>::value());*/
51 }
52 } // namespace lua
53} // namespace galaxy
void inject_services()
Regsiter static engine services in lua.
Timer.hpp galaxy.
Definition Async.hpp:17