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

25 lines
813 B
C#
Raw Normal View History

2023-11-23 22:07:49 +03:00
namespace Syntriax.Engine.Core.Abstract;
/// <summary>
2024-02-01 12:14:53 +03:00
/// Represents a behaviour that any object in the game might use to interact with itself or other objects.
2023-11-23 22:07:49 +03:00
/// </summary>
public interface IBehaviour : IEntity, IAssignableBehaviourController, IAssignableStateEnable
2023-11-23 22:07:49 +03:00
{
/// <summary>
2024-02-01 12:14:53 +03:00
/// Event triggered when the priority of the <see cref="IBehaviour"/> changes.
2023-11-23 22:07:49 +03:00
/// </summary>
event OnPriorityChangedEventHandler? OnPriorityChanged;
2023-11-23 22:07:49 +03:00
/// <summary>
2024-02-01 12:14:53 +03:00
/// The priority of the <see cref="IBehaviour"/>.
2023-11-23 22:07:49 +03:00
/// </summary>
int Priority { get; set; }
2024-01-28 14:56:44 +03:00
/// <summary>
2024-02-01 12:14:53 +03:00
/// The value indicating whether the <see cref="IBehaviour"/> is active.
2024-01-28 14:56:44 +03:00
/// </summary>
bool IsActive { get; }
2024-07-15 01:13:39 +03:00
delegate void OnPriorityChangedEventHandler(IBehaviour sender, int previousPriority);
2023-11-23 22:07:49 +03:00
}