Syntriax.Engine/Engine.Core/Abstract/IEntity.cs

21 lines
638 B
C#
Raw Normal View History

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>
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-07-15 01:13:39 +03:00
event OnIdChangedDelegate? 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
delegate void OnIdChangedDelegate(IEntity sender, string previousId);
2023-11-23 22:07:49 +03:00
}