コード例 #1
0
ファイル: RenderObject.cs プロジェクト: whereismyguts/Project
 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
ファイル: Control.cs プロジェクト: whereismyguts/Project
 public void SetImage(SpriteInfo info) {
     sprite = new Sprite(info, Rectangle);
 }