public void ReadFileStr(string noticeKey, string fileUrl, float timeoutSec, WWWUrlRstDel del, LuaFunction lua) { mType = WWWType.read; mUrlRstDel = del; setLuaCallback(lua); mTimeoutSec = timeoutSec; NoticeKey = noticeKey; mList.Clear(); mList.Add(new WWWInfo(fileUrl, "")); }
/// <summary> /// 请求某个链接,并获取其返回值或错误信息 /// </summary> /// <param name="url">请求地址</param> /// <param name="timeoutSec">超时时间(秒)</param> /// <param name="del">请求回调: /// (bool rst, string msg) /// rst 表示请求是否成功,msg信息(成返回结果,失败返回错误信息) /// </param> /// <param name="lua">lua回调,参数跟del相同</param> public void RequestUrl(string url, float timeoutSec, WWWUrlRstDel del, LuaFunction lua) { mType = WWWType.request; mUrlRstDel = del; setLuaCallback(lua); mTimeoutSec = timeoutSec; mList.Add(new WWWInfo() { Url = url, }); }
public static WWWTO ReadFileStr(string fileUrl, WWWUrlRstDel del, LuaFunction lua) { WWWTO www = new WWWTO(); www.mType = WWWType.read; www.mUrlRstDel = del; www._setLuaCallback(lua); www.mList.Clear(); www.mList.Add(new WWWInfo(fileUrl, "")); return(www); }
/// <summary> /// 请求某个链接,并获取其返回值或错误信息 /// </summary> /// <param name="url">请求地址</param> /// <param name="del">请求回调: /// (bool rst, string msg) /// rst 表示请求是否成功,msg信息(成返回结果,失败返回错误信息) /// </param> /// <param name="lua">lua回调,参数跟del相同</param> public static WWWTO RequestUrl(string url, WWWUrlRstDel del, LuaFunction lua) { WWWTO www = new WWWTO(); www.mType = WWWType.request; www.mUrlRstDel = del; www._setLuaCallback(lua); www.mList.Add(new WWWInfo() { Url = url, }); return(www); }
public void ReadFirstExistsStr(string noticeKey, List <string> files, float timeoutSec, WWWUrlRstDel del, LuaFunction lua) { mType = WWWType.read; mUrlRstDel = del; setLuaCallback(lua); mTimeoutSec = timeoutSec; NoticeKey = noticeKey; mList.Clear(); for (int i = 0; i < files.Count; i++) { string fileUrl = files[i]; mList.Add(new WWWInfo(fileUrl, "")); } }
public static WWWTO ReadFirstExistsStr(List <string> files, WWWUrlRstDel del, LuaFunction lua) { WWWTO www = new WWWTO(); www.mType = WWWType.read; www.mUrlRstDel = del; www._setLuaCallback(lua); www.mList.Clear(); for (int i = 0; i < files.Count; i++) { string fileUrl = files[i]; www.mList.Add(new WWWInfo(fileUrl, "")); } return(www); }