示例#1
0
        /// <summary>
        ///  以 WWW 方式加载网络非ab资源
        /// </summary>
        /// <param name="req"></param>
        /// <param name="coroutine"></param>
        /// <returns></returns>
        static public void HttpWebRequest(CRequest req)
        {
            HttpWebRequestOperation op = HttpWebRequestOperation.Get();

            op.SetRequest(req);
            inProgressOperations.Add(op);
            op.BeginDownload();
        }
示例#2
0
        /// <summary>
        ///  以 WWW 方式加载网络非ab资源
        /// </summary>
        /// <param name="url"></param>
        /// <param name="head"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        static public HttpLoadOperation HttpWebRequestCoroutine(string url, WebHeaderCollection head, System.Type type)
        {
            var req = CRequest.Get();

            req.vUrl      = url;
            req.head      = head;
            req.assetType = type;
            HttpWebRequestOperation op = new HttpWebRequestOperation();

            req.assetOperation = op;
            op.SetRequest(req);
            inProgressOperations.Add(op);
            op.BeginDownload();
            return(op);
        }
示例#3
0
 public static void Release(HttpWebRequestOperation toRelease)
 {
     webOperationPool.Release(toRelease);
 }
示例#4
0
 private static void m_ActionOnRelease(HttpWebRequestOperation op)
 {
     op.Reset();
     op.httpIsDone = false;
 }
示例#5
0
 private static void m_ActionOnGet(HttpWebRequestOperation op)
 {
     op.pool = true;
 }