KavTest/KavTest/Components/SpriteComponent.cs

28 lines
719 B
C#
Raw Normal View History

2020-12-04 23:40:27 +00:00
using Encompass;
2020-12-05 02:52:20 +00:00
using Kav;
2020-12-04 23:40:27 +00:00
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace KavTest
{
public struct SpriteComponent : IComponent
{
public Texture2D Texture { get; }
public Vector2 Origin { get; }
2020-12-05 02:52:20 +00:00
public float Rotation { get; }
public SpriteBillboardConstraint BillboardConstraint { get; }
2020-12-04 23:40:27 +00:00
2020-12-05 02:52:20 +00:00
public SpriteComponent(
Texture2D texture,
Vector2 origin,
float rotation,
SpriteBillboardConstraint billboardConstraint
) {
2020-12-04 23:40:27 +00:00
Texture = texture;
Origin = origin;
2020-12-05 02:52:20 +00:00
Rotation = rotation;
BillboardConstraint = billboardConstraint;
2020-12-04 23:40:27 +00:00
}
}
}