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

23 lines
759 B
C#
Raw Normal View History

2023-11-23 22:07:49 +03:00
namespace Syntriax.Engine.Core.Abstract;
/// <summary>
/// Indicates the class implementing it has Assignable fields that are necessary for the engine to work properly.
/// </summary>
2023-11-24 17:03:21 +03:00
public interface IAssignable
{
/// <summary>
2024-02-01 12:06:31 +03:00
/// Event triggered when the <see cref="IAssignable"/>'s fields are unassigned and completely ready to recycle.
2023-11-24 17:03:21 +03:00
/// </summary>
2024-07-15 01:13:39 +03:00
event OnUnassignedDelegate? OnUnassigned;
2023-11-24 17:03:21 +03:00
/// <summary>
/// Unassign <see cref="IAssignable"/>'s all fields and make it ready to recycle.
/// </summary>
/// <returns>
/// <see cref="true"/>, if the fields are unsigned successfully, <see cref="false"/> if not.
/// </returns>
bool Unassign();
2024-07-15 01:13:39 +03:00
delegate void OnUnassignedDelegate(IAssignable sender);
2023-11-24 17:03:21 +03:00
}