21 lines
		
	
	
		
			624 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			624 B
		
	
	
	
		
			C#
		
	
	
	
	
	
namespace Engine.Core;
 | 
						|
 | 
						|
/// <summary>
 | 
						|
/// Represents a basic entity in the engine.
 | 
						|
/// </summary>
 | 
						|
public interface IEntity : IInitializable, IHasStateEnable
 | 
						|
{
 | 
						|
    /// <summary>
 | 
						|
    /// Event triggered when the <see cref="Id"/> of the <see cref="IEntity"/> changes.
 | 
						|
    /// The string action parameter is the previous <see cref="Id"/> of the <see cref="IEntity"/>. 
 | 
						|
    /// </summary>
 | 
						|
    Event<IEntity, IdChangedArguments> OnIdChanged { get; }
 | 
						|
 | 
						|
    /// <summary>
 | 
						|
    /// The ID of the <see cref="IEntity"/>.
 | 
						|
    /// </summary>
 | 
						|
    string Id { get; set; }
 | 
						|
 | 
						|
    readonly record struct IdChangedArguments(string PreviousId);
 | 
						|
}
 |