Syntriax.Engine/Engine.Core/Abstract/INameable.cs

20 lines
467 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 an entity with a name.
/// </summary>
2023-11-23 22:07:49 +03:00
public interface INameable
{
2024-02-01 12:14:53 +03:00
/// <summary>
/// Event triggered when the name of the entity changes.
/// </summary>
2024-07-15 01:13:39 +03:00
event OnNameChangedDelegate? OnNameChanged;
2024-02-01 12:14:53 +03:00
/// <summary>
/// The name of the entity.
/// </summary>
2023-11-23 22:07:49 +03:00
string Name { get; set; }
2024-07-15 01:13:39 +03:00
delegate void OnNameChangedDelegate(INameable sender, string previousName);
2023-11-23 22:07:49 +03:00
}