Ejemplo n.º 1
0
 private void ProcessPlatformStructure(GameStructureProcessor processor, PlatformGameStructure structure)
 {
     foreach (KeyValuePair <string, string> file in structure.Files)
     {
         processor.AddScheme(file.Value, file.Key);
     }
 }
        private void Load(List <string> pathes, LayoutInfo layinfo)
        {
            if (CheckPC(pathes))
            {
            }
            else if (CheckLinux(pathes))
            {
            }
            else if (CheckMac(pathes))
            {
            }
            else if (CheckAndroid(pathes))
            {
            }
            else if (CheckiOS(pathes))
            {
            }
            else if (CheckSwitch(pathes))
            {
            }
            else if (CheckWebGL(pathes))
            {
            }
            else if (CheckWebPlayer(pathes))
            {
            }
            CheckMixed(pathes);

            using (GameStructureProcessor processor = new GameStructureProcessor())
            {
                if (PlatformStructure != null)
                {
                    ProcessPlatformStructure(processor, PlatformStructure);
                }
                if (MixedStructure != null)
                {
                    ProcessPlatformStructure(processor, MixedStructure);
                }
                processor.AddDependencySchemes(RequestDependency);

                if (processor.IsValid)
                {
                    layinfo = layinfo ?? processor.GetLayoutInfo();
                    AssetLayout layout             = new AssetLayout(layinfo);
                    GameCollection.Parameters pars = new GameCollection.Parameters(layout);
                    pars.ScriptBackend           = GetScriptingBackend();
                    pars.RequestAssemblyCallback = OnRequestAssembly;
                    pars.RequestResourceCallback = OnRequestResource;
                    FileCollection = new GameCollection(pars);
                    processor.ProcessSchemes(FileCollection);
                }
            }
        }
Ejemplo n.º 3
0
        private void Load(List <string> pathes)
        {
            if (CheckPC(pathes))
            {
            }
            else if (CheckLinux(pathes))
            {
            }
            else if (CheckMac(pathes))
            {
            }
            else if (CheckAndroid(pathes))
            {
            }
            else if (CheckiOS(pathes))
            {
            }
            else if (CheckWebGL(pathes))
            {
            }
            else if (CheckWebPlayer(pathes))
            {
            }
            CheckMixed(pathes);

            using (GameStructureProcessor processor = new GameStructureProcessor())
            {
                if (PlatformStructure != null)
                {
                    ProcessPlatformStructure(processor, PlatformStructure);
                }
                if (MixedStructure != null)
                {
                    ProcessPlatformStructure(processor, MixedStructure);
                }
                processor.AddDependencySchemes(RequestDependency);
                processor.ProcessSchemes(FileCollection);
            }
        }