From dbb26902ed54ce308fdcec4697616e152f2894fd Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Mon, 16 Sep 2019 12:46:44 -0400 Subject: success with font loading --- src/script.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/script.hpp') diff --git a/src/script.hpp b/src/script.hpp index d4e2234..f86c8cd 100644 --- a/src/script.hpp +++ b/src/script.hpp @@ -45,6 +45,7 @@ private: * interactions between C and Lua */ sol::state lua; + sol::table game; entityx::EntityManager& manager; @@ -96,6 +97,11 @@ public: * Contains all calls that export components/functions to lua. */ void scriptExport(void); + + template + void addToGameNamespace(const std::string& name, F func) { + game.set_function(name, func); + } }; #endif // SYSTEM_SCRIPT_HPP_ -- cgit v1.2.3