Пример #1
0
        public static async Task <SpriteSheetSource> CreateImageSource(ParFile parFile)
        {
            SpriteSheetSource imageSource = new SpriteSheetSource(parFile);

            foreach (ParEntry entry in parFile.Entries)
            {
                try
                {
                    imageSource.filenames.Add(entry.FileName);
                    GTF gtf = GTF.CreateFromGtfStream(await entry.GetData());
                    imageSource.gtfs.Add(gtf);
                }
                catch (Exception)
                {
                    throw;
                }
            }
            return(imageSource);
        }
Пример #2
0
 private async Task LoadImageSource()
 {
     imageSource = await SpriteSheetSource.CreateImageSource(ptaFile);
 }