Пример #1
0
 public Sprite(SpriteInfo info, Rectangle rectangle) {
     rotation = 0;
     texture = WinAdapter.GetTexture(info.Content);
     frames = info.Framecount;
     DestRect = rectangle;
     origin = new Vector2();
     if(texture == null)
         return;
     frameHeight = texture.Height;
     frameWidth = texture.Width / frames;
 }
Пример #2
0
 public void SetImage(SpriteInfo info) {
     sprite = new Sprite(info, Rectangle);
 }