2023-11-23 22:07:49 +03:00
|
|
|
namespace Syntriax.Engine.Core.Abstract;
|
|
|
|
|
2024-02-01 12:14:53 +03:00
|
|
|
/// <summary>
|
|
|
|
/// Represents a basic entity in the engine.
|
|
|
|
/// </summary>
|
2023-11-24 17:04:19 +03:00
|
|
|
public interface IEntity : IInitialize, IAssignableStateEnable
|
2023-11-23 22:07:49 +03:00
|
|
|
{
|
2024-02-02 12:11:51 +03:00
|
|
|
/// <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>
|
2024-11-23 23:14:44 +03:00
|
|
|
event OnIdChangedEventHandler? OnIdChanged;
|
2024-02-02 12:11:51 +03:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// The ID of the <see cref="IEntity"/>.
|
|
|
|
/// </summary>
|
|
|
|
string Id { get; set; }
|
2024-07-15 01:13:39 +03:00
|
|
|
|
2024-11-23 23:14:44 +03:00
|
|
|
delegate void OnIdChangedEventHandler(IEntity sender, string previousId);
|
2023-11-23 22:07:49 +03:00
|
|
|
}
|