Beispiel #1
0
        private void OpenBaseStream()
        {
            var assetsFileStream = FileProvider.ReadCombinedAssets(AssetsRootPath + AssetsFilename);

            if (!assetsFileStream.CanSeek)
            {
                throw new NotSupportedException("Stream must support seeking!");
            }
            BaseStream = assetsFileStream;
        }
Beispiel #2
0
        public AssetsFile GetAssetsFile(string assetsFilename)
        {
            if (_openAssetsFiles.ContainsKey(assetsFilename))
            {
                return(_openAssetsFiles[assetsFilename]);
            }
            AssetsFile assetsFile = new AssetsFile(this, assetsFilename, _fileProvider.ReadCombinedAssets(BSConst.KnownFiles.AssetsRootPath + assetsFilename), false);

            _openAssetsFiles.Add(assetsFilename, assetsFile);
            assetsFile.Load();
            return(assetsFile);
        }