protected void drawDrawable(DrawData toDraw) { Rectangle destination = new Rectangle( toDraw.WorldPosition.X, toDraw.WorldPosition.Y, toDraw.DrawWidth, toDraw.DrawHeight); spriteBatch.Draw(toDraw.Art, destination, toDraw.Source, Color.White); }
public override void Initialize(Game game) { base.Initialize(game); Texture2D playerTexture = game.Content.Load<Texture2D>( "Character Horn Girl"); Drawable = new DrawData( playerTexture, playerTexture.Bounds, Position, playerTexture.Bounds.Width, playerTexture.Bounds.Height ); }