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

20 lines
554 B
C#
Raw Permalink Normal View History

2023-11-23 22:07:49 +03:00
using System;
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>
2023-11-23 22:07:49 +03:00
Action<IStateEnable>? OnEnabledChanged { get; set; }
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; }
}