コード例 #1
0
        public T GetMsg <T>() where T : XMessage, new()
        {
            var obj = XObjectPool.Alloc <T>();

            obj.SetName(typeof(T).Name);
            return(obj);
        }
コード例 #2
0
        protected void _AddRequest(UnityWebRequest webRequest, string encrypt, Action <string, string> strResponse, Action <string, byte[]> binResponse, Action <float> onProgress)
        {
            var request = XObjectPool.Alloc <XWebRequest>();

            request.async       = webRequest.SendWebRequest();
            request.encrypt     = encrypt;
            request.strResponse = strResponse;
            request.binResponse = binResponse;
            request.onProgress  = onProgress;
            m_requests.Add(request);
        }