2025-05-30 18:37:35 +03:00

20 lines
561 B
C#

namespace Syntriax.Engine.Core;
/// <summary>
/// Represents an entity which can be active or not.
/// </summary>
public interface IActive
{
/// <summary>
/// Event triggered when the <see cref="IsActive"/> state of the <see cref="IActive"/> changes.
/// </summary>
Event<IActive, ActiveChangedArguments> OnActiveChanged { get; }
/// <summary>
/// The value indicating whether the <see cref="IActive"/> is enabled.
/// </summary>
bool IsActive { get; }
readonly record struct ActiveChangedArguments(bool PreviousState);
}