namespace Syntriax.Engine.Core.Abstract;
///
/// Represents the transformation properties of an object such as position, scale, and rotation in 2D space.
///
public interface ITransform2D : IBehaviour
{
///
/// Event triggered when the of the changes.
///
event PositionChangedEventHandler? OnPositionChanged;
///
/// Event triggered when the of the changes.
///
event ScaleChangedEventHandler? OnScaleChanged;
///
/// Event triggered when the of the changes.
///
event RotationChangedEventHandler? OnRotationChanged;
///
/// The world position of the in 2D space.
///
Vector2D Position { get; set; }
///
/// The world scale of the .
///
Vector2D Scale { get; set; }
///
/// The world rotation of the in degrees.
///
float Rotation { get; set; }
///
/// The local position of the in 2D space.
///
Vector2D LocalPosition { get; set; }
///
/// The local scale of the .
///
Vector2D LocalScale { get; set; }
///
/// The local rotation of the in degrees.
///
float LocalRotation { get; set; }
///
/// Delegate for the event triggered when the 's rotation changes.
///
/// The that the parent has changed.
/// The previous of the .
delegate void PositionChangedEventHandler(ITransform2D sender, Vector2D previousPosition);
///
/// Delegate for the event triggered when the 's rotation changes.
///
/// The that the parent has changed.
/// The previous of the .
delegate void ScaleChangedEventHandler(ITransform2D sender, Vector2D previousScale);
///
/// Delegate for the event triggered when the 's rotation changes.
///
/// The that the parent has changed.
/// The previous of the .
delegate void RotationChangedEventHandler(ITransform2D sender, float previousRotation);
}