void Game_RegisterLuaFunctions(lua::State& state) { state.set("debuginfo", lua_debuginfo); state.set("mlook", lua_mlook); state.set("freelook", lua_freelook); state.set("noclip", lua_noclip); state.set("cam_distance", lua_cam_distance); state.set("timescale", lua_timescale); }
Foo(lua::State& state) { state.set("Foo_setA", [this](int value) { a = value; } ); state.set("Foo_setB", std::function<void(int)>(std::bind(&Foo::setB, this, _1)) ); }