示例#1
0
 public static void ReadLocalFile(string path, ResourceTool.FinishReadNotify notify)
 {
     ResourceTool.DownloadCommand item = default(ResourceTool.DownloadCommand);
     string str = "file:///";
     item.resource = new WWW(str + path);
     Debug.Log("url       =" + item.resource.url);
     item.notify = notify;
     ResourceTool.msDownloadCommands.Add(item);
 }
示例#2
0
 public static WWW ReadNetFile(string path, bool isCache, ResourceTool.FinishReadNotify notify)
 {
     WWW wWW = null;
     HashName hashName = new HashName(path);
     if (ResourceTool.msCache.TryGetValue(hashName.GetId(), out wWW))
     {
         notify(true, wWW);
         return wWW;
     }
     ResourceTool.DownloadCommand item = default(ResourceTool.DownloadCommand);
     item.resource = new WWW(path);
     item.isCache = isCache;
     item.notify = notify;
     ResourceTool.msDownloadCommands.Add(item);
     return item.resource;
 }
示例#3
0
 public DownloadFileToLocal(string path, ResourceTool.FinishDownloadNotify notify)
 {
     this.mPath = path;
     this.mNotify = notify;
 }
示例#4
0
 public static void DownloadFile(string fromPath, string toPath, ResourceTool.FinishDownloadNotify notify)
 {
     ResourceTool.DownloadFileToLocal @object = new ResourceTool.DownloadFileToLocal(toPath, notify);
     ResourceTool.ReadNetFile(fromPath, false, new ResourceTool.FinishReadNotify(@object.FinishDownLoad));
 }