Exemplo n.º 1
0
    void OnReceiveAppUpdateData(WebRequestAgent.WebResponseData data)
    {
        if (data.responseType != WebRequestAgent.ResponseDataType.Text)
        {
            Debug.LogError("Downloading app update data failed!");
            return;
        }

        remoteConfig = JsonUtility.FromJson <AppUpdateConfig>(data.text);
    }
Exemplo n.º 2
0
    void OnReceiveVipIDLibraryResponse(WebRequestAgent.WebResponseData data)
    {
        bool serverQuerySucceed = false;

        if (data.responseType == WebRequestAgent.ResponseDataType.Text)
        {
            serverQuerySucceed = true;
            idDataCache.AddRange(StringToIDList(data.text));
        }

        idDataCache.AddRange(StringToIDList(ReadLocalConfig()));
        contentReadyHandler?.Invoke(idDataCache, serverQuerySucceed);
        contentReadyHandler = null;
        inCommitingProcess  = false;
    }
Exemplo n.º 3
0
    void OnReceiveNotifySubscribersResponse(WebRequestAgent.WebResponseData data)
    {
        try
        {
            if (data.responseType == WebRequestAgent.ResponseDataType.Text)
            {
                notifySubscriberSettings = JsonUtility.FromJson <NotifySubcriberSettings>(data.text);
            }
            else
            {
                notifySubscriberSettings = null;
                Debug.LogError("Response Type Not Matched!");
            }
        }
        catch (Exception e)
        {
            Debug.LogError(e.Message);
        }

        inCommitingProcess = false;
    }