Esempio n. 1
0
 /// <summary>
 /// loads a sprite from a SimpleArchive.
 /// </summary>
 public SpriteManager LoadSpriteManager(SimpleArchive sar)
 {
     SpriteManager ret = new SpriteManager();
     ret.frames = new Image[sar.numFiles];
     ret.NumFrames = sar.numFiles;
     for (int i=0; i<sar.numFiles; i++)
     using (Stream s = sar.open(sar.sortedFiles[i]))
         ret.frames[i] = Game.LoadImage(s);
     return ret;
 }
Esempio n. 2
0
 /// <summary>
 /// loads a sprite from a SimpleArchive.
 /// </summary>
 public SpriteManager LoadSpriteManager(string fname)
 {
     Stream stream = ResourceManager.Open(fname);
     using (SimpleArchive sar = new SimpleArchive(stream))
     return LoadSpriteManager(sar);
 }