9 #include <entt/entity/registry.hpp> 20 sol::function Tick = sol::nil;
21 sol::function Start = sol::nil;
28 class LuaManager :
public Singleton<LuaManager>
37 void Init(entt::registry* t_Registry);
42 void Shutdown()
override;
54 void Tick(
float t_deltaTime);
64 void RegisterScript(File* t_ScriptFile, entt::entity t_Ent);
73 void LoadScript(File* t_File, entt::entity t_Ent, LuaBehaviors* t_Behavior);
82 void AddCallback(
const sol::state& t_LuaState,
const char* t_FunctionName, sol::function* t_Callbacks);
89 void LuaPrint(
const std::string& t_Message);
96 void DefineLuaTypes(sol::state& t_LuaState);
103 void DefineLuaFunctions(sol::state& t_LuaState);
112 void LuaScriptAdded(entt::entity t_Ent, entt::registry& t_Reg, ScriptComponent& t_LuaScript);
115 entt::registry* m_Registry =
nullptr;
118 std::unordered_map<File*, LuaBehaviors> m_LuaComponents;