refactor!: Identifiable interface extracted from IEntity

This commit is contained in:
2025-10-26 22:34:50 +03:00
parent 30a07dd034
commit ac2e160abb
13 changed files with 94 additions and 88 deletions

View File

@@ -3,18 +3,4 @@ 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);
}
public interface IEntity : IInitializable, IIdentifiable, IHasStateEnable;