30 lines
571 B
C#
30 lines
571 B
C#
using System;
|
|
|
|
using Microsoft.Xna.Framework;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
|
|
using Syntriax.Engine.Core.Abstract;
|
|
|
|
namespace Syntriax.Engine.Core;
|
|
|
|
// TODO Probably gonna have to rethink this
|
|
public class Sprite : ISprite
|
|
{
|
|
public Action<ISprite>? OnTextureChanged { get; set; }
|
|
|
|
private Texture2D _texture = null!;
|
|
|
|
public Texture2D Texture2D
|
|
{
|
|
get => _texture;
|
|
set
|
|
{
|
|
if (_texture == value)
|
|
return;
|
|
|
|
_texture = value;
|
|
OnTextureChanged?.Invoke(this);
|
|
}
|
|
}
|
|
}
|