feat: IActive interface added for hierarchy active state
This commit is contained in:
19
Engine.Core/Abstract/IActive.cs
Normal file
19
Engine.Core/Abstract/IActive.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
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);
|
||||
}
|
Reference in New Issue
Block a user