KavTest/KavTest/Messages/BillboardSpriteSpawnMessage.cs

29 lines
767 B
C#
Raw Normal View History

2020-12-04 23:40:27 +00:00
using Encompass;
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; }
public BillboardSpriteSpawnMessage(
Texture2D texture,
Vector3 position,
float rotation,
Vector2 scale
) {
Texture = texture;
Origin = new Vector2(texture.Width / 2, texture.Height / 2);
Position = position;
Rotation = rotation;
Scale = scale;
}
}
}