Syntriax.Engine/Engine.Core/Abstract/IBehaviour.cs

25 lines
818 B
C#

namespace Syntriax.Engine.Core.Abstract;
/// <summary>
/// Represents a behaviour that any object in the game might use to interact with itself or other objects.
/// </summary>
public interface IBehaviour : IEntity, IAssignableBehaviourController, IAssignableStateEnable, IInitialize
{
/// <summary>
/// Event triggered when the priority of the <see cref="IBehaviour"/> changes.
/// </summary>
event OnPriorityChangedDelegate? OnPriorityChanged;
/// <summary>
/// The priority of the <see cref="IBehaviour"/>.
/// </summary>
int Priority { get; set; }
/// <summary>
/// The value indicating whether the <see cref="IBehaviour"/> is active.
/// </summary>
bool IsActive { get; }
delegate void OnPriorityChangedDelegate(IBehaviour sender, int previousPriority);
}