using System;
using System.Collections.Generic;
namespace Syntriax.Engine.Core.Abstract;
///
/// Represents the transformation properties of an object such as position, scale, and rotation.
///
public interface ITransform : IAssignableGameObject, IEnumerable
{
///
/// Event triggered when the of the changes.
///
Action? OnPositionChanged { get; set; }
///
/// Event triggered when the of the changes.
///
Action? OnScaleChanged { get; set; }
///
/// Event triggered when the of the changes.
///
Action? OnRotationChanged { get; set; }
///
/// Event triggered when the of the changes. The second parameter is the old .
///
Action? OnParentChanged { get; set; }
///
/// Event triggered when a new is added to the .
///
Action? OnChildrenAdded { get; set; }
///
/// Event triggered when an is removed from the .
///
Action? OnChildrenRemoved { get; set; }
///
/// 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; }
///
/// The parent of the .
///
ITransform? Parent { get; }
///
/// The s that have this as their .
///
IReadOnlyList Children { get; }
///
/// Sets the parent of this .
///
/// The parent to set.
void SetParent(ITransform? transform);
///
/// Adds a child to this .
///
/// The child to add.
void AddChild(ITransform transform);
///
/// Removes a child from this .
///
/// The child to remove.
void RemoveChild(ITransform transform);
}