Esempio n. 1
0
    private static int IsNetworkConnected(IntPtr L)
    {
        int result;

        try
        {
            ToLua.CheckArgsCount(L, 2);
            PlatformUtil platformUtil = (PlatformUtil)ToLua.CheckObject(L, 1, typeof(PlatformUtil));
            bool         isShowTips   = LuaDLL.luaL_checkboolean(L, 2);
            bool         value        = platformUtil.IsNetworkConnected(isShowTips);
            LuaDLL.lua_pushboolean(L, value);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaDLL.toluaL_exception(L, e, null);
        }
        return(result);
    }