Пример #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));
 }