コード例 #1
0
 public static IEnumerable <string> GetAssetList()
 {
     foreach (string fileFullPath in Directory.GetFiles(AssetDirectory, "*.asset"))
     {
         FileInfo fileInfo = new FileInfo(fileFullPath);
         yield return(JPFileMap.GetFileName(fileInfo.Name));
     }
 }
コード例 #2
0
 private void DownloadInfoData(string task)
 {
     Connector.Value.PostForm("SelectFiles", "Explorer",
                              new Dictionary <string, object>()
     {
         { "File", new string[] { $"Task/{task}" } },
     })
     ?.Result.Get("DownloadFile", "Explorer",
                  (object contents) =>
     {
         lock (LockFactor)
         {
             Callback = () => JigsawPuzzleAsset.OverrideInfoData(JPFileMap.GetFileName(task), contents as byte[]);
         }
     },
                  (HttpResponseMessage message) =>
     {
         Debug.LogError(message.Content.ReadAsStringAsync().Result);
     });
 }
コード例 #3
0
 private void GetTaskMap()
 {
     Connector.Value.Get("GetFileMapJson", "Explorer",
                         (object obj) =>
     {
         FileMap             = obj as JPFileMap;
         string[] serverTask = FileMap.Task;
         FileMap.ClientTask  = new string[serverTask.Length];
         string[] clientTask = FileMap.ClientTask;
         HashSet <string> clientAssetFile = new HashSet <string>(JigsawPuzzleAsset.GetAssetList());
         for (int index = 0; index < serverTask.Length; index++)
         {
             string fileName = JPFileMap.GetFileName(serverTask[index]);
             if (clientAssetFile.Contains(fileName))
             {
                 clientTask[index] = "Exists";
             }
             else
             {
                 clientTask[index] = "Not Found";
             }
         }
     });
 }