KavTest/KavTest/Messages/BillboardSpriteSpawnMessage.cs

33 lines
962 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.Messages
{
public struct BillboardSpriteSpawnMessage : IMessage
{
public Texture2D Texture { get; }
public Vector3 Position { get; }
public Vector2 Origin { get; }
public float Rotation { get; }
public Vector2 Scale { get; }
2020-12-05 02:52:20 +00:00
public SpriteBillboardConstraint BillboardConstraint { get; }
2020-12-04 23:40:27 +00:00
public BillboardSpriteSpawnMessage(
Texture2D texture,
Vector3 position,
float rotation,
2020-12-05 02:52:20 +00:00
Vector2 scale,
SpriteBillboardConstraint billboardConstraint
2020-12-04 23:40:27 +00:00
) {
Texture = texture;
Origin = new Vector2(texture.Width / 2, texture.Height / 2);
Position = position;
Rotation = rotation;
Scale = scale;
2020-12-05 02:52:20 +00:00
BillboardConstraint = billboardConstraint;
2020-12-04 23:40:27 +00:00
}
}
}