public void Action(float a) { #if THREAD_SAFE || HOTFIX_ENABLE lock (luaEnv.luaEnvLock) { #endif var L = luaEnv.L; var translator = luaEnv.translator; int oldTop = LuaAPI.lua_gettop(L); int errFunc = LuaAPI.load_error_func(L, luaEnv.errorFuncRef); LuaAPI.lua_getref(L, luaReference); LuaAPI.lua_pushnumber(L, a); int error = LuaAPI.lua_pcall(L, 1, 0, errFunc); if (error != 0) { luaEnv.ThrowExceptionFromError(oldTop); } LuaAPI.lua_settop(L, oldTop); #if THREAD_SAFE || HOTFIX_ENABLE } #endif }