static int GetCurBatteryLevel(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); GameSDKInterface obj = (GameSDKInterface)ToLua.CheckObject <GameSDKInterface>(L, 1); int o = obj.GetCurBatteryLevel(); LuaDLL.lua_pushinteger(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }