20 lines
566 B
C#
20 lines
566 B
C#
namespace Syntriax.Engine.Core.Abstract;
|
|
|
|
/// <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 ActiveChangedEventHandler? OnActiveChanged;
|
|
|
|
/// <summary>
|
|
/// The value indicating whether the <see cref="IActive"/> is enabled.
|
|
/// </summary>
|
|
bool IsActive { get; }
|
|
|
|
delegate void ActiveChangedEventHandler(IActive sender, bool previousState);
|
|
}
|