Syntriax.Engine/Engine.Core/Abstract/IStateEnable.cs

20 lines
616 B
C#
Raw Normal View History

2023-11-23 22:07:49 +03:00
namespace Syntriax.Engine.Core.Abstract;
2024-02-01 12:14:53 +03:00
/// <summary>
/// Represents an entity with an enable state that can be toggled.
/// </summary>
2023-11-23 22:07:49 +03:00
public interface IStateEnable : IAssignableEntity
{
2024-02-01 12:14:53 +03:00
/// <summary>
/// Event triggered when the <see cref="Enabled"/> state of the <see cref="IStateEnable"/> changes.
/// </summary>
2024-07-15 01:13:39 +03:00
event OnNameChangedDelegate? OnEnabledChanged;
2024-02-01 12:14:53 +03:00
/// <summary>
/// The value indicating whether the <see cref="IStateEnable"/> is enabled.
/// </summary>
2023-11-23 22:07:49 +03:00
bool Enabled { get; set; }
2024-07-15 01:13:39 +03:00
delegate void OnNameChangedDelegate(IStateEnable sender, bool previousState);
2023-11-23 22:07:49 +03:00
}