axiosengine/axios/DrawingSystem/Sprite.cs

23 lines
556 B
C#
Raw Normal View History

2012-03-19 23:57:59 +00:00
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace FarseerPhysics.SamplesFramework
{
public struct Sprite
{
public Vector2 Origin;
public Texture2D Texture;
public Sprite(Texture2D texture, Vector2 origin)
{
this.Texture = texture;
this.Origin = origin;
}
public Sprite(Texture2D sprite)
{
Texture = sprite;
Origin = new Vector2(sprite.Width / 2f, sprite.Height / 2f);
}
}
}