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

25 lines
722 B
C#

using System;
namespace Syntriax.Engine.Core.Abstract;
/// <summary>
/// Responsible for every behaviour an object in the game might have, controlled by <see cref="IBehaviourController"/>.
/// </summary>
public interface IBehaviour : IEntity, IAssignableBehaviourController, IAssignableStateEnable, IInitialize
{
/// <summary>
/// Callback triggered when the <see cref="Priority"/> has changed.
/// </summary>
Action<IBehaviour>? OnPriorityChanged { get; set; }
/// <summary>
/// Call priority of the <see cref="IBehaviour"/>.
/// </summary>
int Priority { get; set; }
/// <summary>
/// If the <see cref="IBehaviour"/> is active.
/// </summary>
bool IsActive { get; }
}