Syntriax.Engine/Engine.Core/Abstract/Assignable/IAssignableBehaviourControl...

27 lines
1.0 KiB
C#
Raw Normal View History

2023-11-23 22:07:49 +03:00
using System;
namespace Syntriax.Engine.Core.Abstract;
/// <summary>
/// Indicates the object is an <see cref="IAssignable"/> with an assignable <see cref="IBehaviourController"/> field.
/// </summary>
public interface IAssignableBehaviourController : IAssignable
{
/// <summary>
/// Callback triggered when the <see cref="IBehaviourController"/> value has has been assigned a new value.
/// </summary>
Action<IAssignableBehaviourController>? OnBehaviourControllerAssigned { get; set; }
/// <inheritdoc cref="IBehaviourController" />
IBehaviourController BehaviourController { get; }
/// <summary>
/// Assign a value to the <see cref="IBehaviourController"/> field of this object
/// </summary>
/// <param name="behaviourController">New <see cref="IBehaviourController"/> to assign.</param>
/// <returns>
/// <see cref="true"/>, if the value given assigned successfully assigned, <see cref="false"/> if not.
/// </returns>
bool Assign(IBehaviourController behaviourController);
}