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.
///
event OnPositionChangedEventHandler? OnPositionChanged;
///
/// Event triggered when the of the changes.
///
event OnScaleChangedEventHandler? OnScaleChanged;
///
/// Event triggered when the of the changes.
///
event OnRotationChangedEventHandler? OnRotationChanged;
///
/// Event triggered when the of the changes. The second parameter is the old .
///
event OnParentChangedEventHandler? OnParentChanged;
///
/// Event triggered when a new is added to the .
///
event OnChildrenAddedEventHandler? OnChildrenAdded;
///
/// Event triggered when an is removed from the .
///
event OnChildrenRemovedEventHandler? OnChildrenRemoved;
///
/// 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);
delegate void OnPositionChangedEventHandler(ITransform sender);
delegate void OnScaleChangedEventHandler(ITransform sender);
delegate void OnRotationChangedEventHandler(ITransform sender);
delegate void OnParentChangedEventHandler(ITransform sender, ITransform? previousParent, ITransform? newParent);
delegate void OnChildrenAddedEventHandler(ITransform sender, ITransform childrenAdded);
delegate void OnChildrenRemovedEventHandler(ITransform sender, ITransform childrenRemoved);
}