Syntriax.Engine/Engine.Core/Abstract/Assignable/IAssignableTransform.cs

27 lines
911 B
C#
Raw Normal View History

2023-11-23 22:07:49 +03:00
using System;
namespace Syntriax.Engine.Core.Abstract;
/// <summary>
/// Indicates the object is an <see cref="IAssignable"/> with an assignable <see cref="ITransform"/> field.
/// </summary>
public interface IAssignableTransform : IAssignable
{
/// <summary>
/// Callback triggered when the <see cref="ITransform"/> value has has been assigned a new value.
/// </summary>
Action<IAssignableTransform>? OnTransformAssigned { get; set; }
/// <inheritdoc cref="ITransform" />
ITransform Transform { get; }
/// <summary>
/// Assign a value to the <see cref="ITransform"/> field of this object
/// </summary>
/// <param name="transform">New <see cref="ITransform"/> to assign.</param>
/// <returns>
/// <see cref="true"/>, if the value given assigned successfully assigned, <see cref="false"/> if not.
/// </returns>
bool Assign(ITransform transform);
}