internal ArchiveFile ReadFile(GameProcessorContext context) { ArchiveFile archive = new ArchiveFile(this); archive.AddFile(context, WebScheme); return(archive); }
internal SerializedFile ReadFile(GameProcessorContext context) { SerializedFile file = new SerializedFile(context.Collection, this); context.AddSerializedFile(file, this); return(file); }
public void ProcessSchemes(GameCollection fileCollection) { GameProcessorContext context = new GameProcessorContext(fileCollection); foreach (FileScheme scheme in m_schemes) { fileCollection.AddFile(context, scheme); } context.ReadSerializedFiles(); }
internal BundleFile ReadFile(GameProcessorContext context) { BundleFile bundle = new BundleFile(this); foreach (FileScheme scheme in Schemes) { bundle.AddFile(context, scheme); } return(bundle); }
internal WebFile ReadFile(GameProcessorContext context) { WebFile web = new WebFile(this); foreach (FileScheme scheme in Schemes) { web.AddFile(context, scheme); } return(web); }
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()); } }