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); }
private async Task LoadImageSource() { imageSource = await SpriteSheetSource.CreateImageSource(ptaFile); }