コード例 #1
0
 /// <summary>
 /// 添加模块资源编译配置
 /// </summary>
 /// <param name="_Config"></param>
 private void AddResourceModelBuildConfig(ResourceModelConfig _Config)
 {
     for (int i = 0; i < Config.ModelBuildConfig.Count; i++)
     {
         if (Config.ModelBuildConfig[i].Name == _Config.Name)
         {
             Config.ModelBuildConfig[i].MergeConfig(_Config);
             return;
         }
     }
     Config.ModelBuildConfig.Add(_Config);
 }
コード例 #2
0
 public void MergeConfig(ResourceModelConfig _Other)
 {
     foreach (var item1 in _Other.ChildBuildItem)
     {
         bool IsKeep = false;
         foreach (var item2 in ChildBuildItem)
         {
             if (item1.Name == item2.Name)
             {
                 item2.MergeConfig(item1);
                 IsKeep = true;
                 break;
             }
         }
         if (!IsKeep)
         {
             ChildBuildItem.Add(item1);
         }
     }
 }
コード例 #3
0
 /// <summary>
 /// 检索模块资源目录
 /// </summary>
 /// <param name="_Path"></param>
 private void RetrievalModelResourceDirectory(ResourceCatalog _Catalog, string _Path)
 {
     string[] fileList = Directory.GetFileSystemEntries(_Path);
     foreach (string file in fileList)
     {
         if (Directory.Exists(file))
         {
             if (file.EndsWith("Module"))
             {
                 ResourceModelConfig ModelConfig = new ResourceModelConfig(_Catalog.Path, file);
                 if (ModelConfig.NodelType != ResourceBuildNodelType.UselessNodel)
                 {
                     AddResourceModelBuildConfig(ModelConfig);
                 }
             }
             else
             {
                 RetrievalModelResourceDirectory(_Catalog, file);
             }
         }
     }
 }