20 lines
		
	
	
		
			605 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			605 B
		
	
	
	
		
			C#
		
	
	
	
	
	
namespace Engine.Core;
 | 
						|
 | 
						|
/// <summary>
 | 
						|
/// Represents an entity with an enable state that can be toggled.
 | 
						|
/// </summary>
 | 
						|
public interface IStateEnable : IHasEntity
 | 
						|
{
 | 
						|
    /// <summary>
 | 
						|
    /// Event triggered when the <see cref="Enabled"/> state of the <see cref="IStateEnable"/> changes.
 | 
						|
    /// </summary>
 | 
						|
    Event<IStateEnable, EnabledChangedArguments> OnEnabledChanged { get; }
 | 
						|
 | 
						|
    /// <summary>
 | 
						|
    /// The value indicating whether the <see cref="IStateEnable"/> is enabled.
 | 
						|
    /// </summary>
 | 
						|
    bool Enabled { get; set; }
 | 
						|
 | 
						|
    readonly record struct EnabledChangedArguments(bool PreviousState);
 | 
						|
}
 |