#ifndef LUA_MANAGER_H #define LUA_MANAGER_H #include #include #include #include #include namespace gameBase{ class LuaManager{ public: struct Index{ std::string index; bool string; Index(std::string index){ this->index = index; this->string = true; } Index(int index){ this->index = std::to_string(index); this->string = false; } Index(float index){ this->index = std::to_string(index); this->string = false; } }; static LuaManager* getSingleton(); inline lua_State* getState(){return state;} void buildScript(std::vector); void executeCode(std::string, std::string = "Error executing code\n"); int getInt(std::vector); bool getBool(std::vector); float getFloat(std::vector); std::string getString(std::vector); private: LuaManager(); void prepareTableForRetrieval(std::vector&); lua_State *state = nullptr; }; typedef LuaManager::Index Index; } #endif