コード例 #1
0
ファイル: Program.cs プロジェクト: perpetualKid/ORTS-MG
 /// <summary>
 /// Load all the requested files one by one in the given order without caring about relations between files.
 /// Many files might not be loadable in this way.
 /// </summary>
 private static void LoadAllFlat()
 {
     foreach (string file in requestedFiles)
     {
         Loader currentLoader = LoaderFactory.GetLoader(file);
         LoadSingleFile(file, currentLoader, 0);
     }
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: perpetualKid/ORTS-MG
 /// <summary>
 /// Load all the requested files one by one in the given order without caring about relations between files.
 /// Many files might not be loadable in this way.
 /// </summary>
 private static void LoadWithAdditional(AdditionType additionType)
 {
     for (int pass = 0; pass < 2; pass++)
     {   // we do two passes, postponing loading of some files to a later stage
         foreach (string file in requestedFiles)
         {
             if (loaded[file])
             {
                 continue;
             }
             Loader currentLoader = LoaderFactory.GetLoader(file);
             if (!currentLoader.IsDependent || pass > 0)
             {
                 LoadFileAndAdditions(file, currentLoader, additionType, 0);
             }
         }
     }
 }