Ejemplo n.º 1
0
    public QUERY_RESULT    DBPull()
    {
        HTTPReq req = MakeQuery_DBPull();   QUERY_RESULT result = (req != null) ? req.SubmitImmediate() : QUERY_RESULT.ERROR; if (result == QUERY_RESULT.SUCCESS)

        {
            OnDBPull(req);
        }
        return(result);
    }
Ejemplo n.º 2
0
    //****************************************************************************************************
    //
    //****************************************************************************************************

    private void SubmitEnd(WWW req, QUERY_RESULT paramResult)
    {
        result = paramResult;

        if (req != null)
        {
            httpErrorCode = GetHttpErrorCode(req.responseHeaders);

            bool httpError = (httpErrorCode >= 0) && (httpErrorCode != 200);

            if (httpError)
            {
                CORE.UTILS.Log(response);
            }

            if (cachePolicy == HTTP_CACHE_POLICY.IMAGE)
            {
                texture = httpError ? textureNotFound : req.texture;

                if ((texture != null) && (texture != textureNotFound))
                {
                    cache.Add(URL, texture);
                }
            }
        }


        if (progressIndicator != null)
        {
            progressIndicator.prc = 1.0f;
        }

        if (onCompletion != null)
        {
            onCompletion.Invoke(this);

            onCompletion = null;
        }
    }