internal ArchiveFile ReadFile(GameProcessorContext context)
        {
            ArchiveFile archive = new ArchiveFile(this);

            archive.AddFile(context, WebScheme);
            return(archive);
        }
示例#2
0
        internal SerializedFile ReadFile(GameProcessorContext context)
        {
            SerializedFile file = new SerializedFile(context.Collection, this);

            context.AddSerializedFile(file, this);
            return(file);
        }
示例#3
0
        public void ProcessSchemes(GameCollection fileCollection)
        {
            GameProcessorContext context = new GameProcessorContext(fileCollection);

            foreach (FileScheme scheme in m_schemes)
            {
                fileCollection.AddFile(context, scheme);
            }
            context.ReadSerializedFiles();
        }
示例#4
0
        internal BundleFile ReadFile(GameProcessorContext context)
        {
            BundleFile bundle = new BundleFile(this);

            foreach (FileScheme scheme in Schemes)
            {
                bundle.AddFile(context, scheme);
            }
            return(bundle);
        }
示例#5
0
        internal WebFile ReadFile(GameProcessorContext context)
        {
            WebFile web = new WebFile(this);

            foreach (FileScheme scheme in Schemes)
            {
                web.AddFile(context, scheme);
            }
            return(web);
        }
示例#6
0
        internal void AddFile(GameProcessorContext context, FileScheme scheme)
        {
            switch (scheme.SchemeType)
            {
            case FileEntryType.Serialized:
            {
                SerializedFileScheme serializedScheme = (SerializedFileScheme)scheme;
                SerializedFile       file             = serializedScheme.ReadFile(context);
                AddSerializedFile(file);
            }
            break;

            case FileEntryType.Bundle:
            {
                BundleFileScheme bundleScheme = (BundleFileScheme)scheme;
                BundleFile       bundle       = bundleScheme.ReadFile(context);
                AddFileList(bundle);
            }
            break;

            case FileEntryType.Archive:
            {
                ArchiveFileScheme archiveScheme = (ArchiveFileScheme)scheme;
                ArchiveFile       archive       = archiveScheme.ReadFile(context);
                AddFileList(archive);
            }
            break;

            case FileEntryType.Web:
            {
                WebFileScheme webScheme = (WebFileScheme)scheme;
                WebFile       webFile   = webScheme.ReadFile(context);
                AddFileList(webFile);
            }
            break;

            case FileEntryType.Resource:
            {
                ResourceFileScheme resourceScheme = (ResourceFileScheme)scheme;
                ResourceFile       resource       = resourceScheme.ReadFile();
                AddResourceFile(resource);
            }
            break;

            default:
                throw new NotSupportedException(scheme.SchemeType.ToString());
            }
        }