feat: IBehaviourController.GetBehaviour
This commit is contained in:
@@ -51,6 +51,15 @@ public interface IBehaviourController : IAssignableGameObject, IEnumerable<IBeha
|
||||
/// <returns>The instantiated <see cref="IBehaviour"/> class after initialization.</returns>
|
||||
T AddBehaviour<T>(params object?[]? args) where T : class, IBehaviour;
|
||||
|
||||
/// <summary>
|
||||
/// Looks up and returns the <see cref="IBehaviour"/> that is controlled by the <see cref="IBehaviourController"/>.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">An implemented class or <see cref="interface"/></typeparam>
|
||||
/// <returns>
|
||||
/// <see cref="T"/>, if the type of <see cref="IBehaviour"/> is present in the <see cref="IBehaviourController"/>, <see cref="null"/> if not.
|
||||
/// </returns>
|
||||
T? GetBehaviour<T>();
|
||||
|
||||
/// <summary>
|
||||
/// Looks up and tries to get the <see cref="IBehaviour"/> that is controlled by the <see cref="IBehaviourController"/>.
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user