refactor: IBehaviourController.GetBehaviours return value replaced with IReadOnlyList
This commit is contained in:
parent
86b8cd9b55
commit
2e2306c5bb
@ -60,7 +60,7 @@ public interface IBehaviourController : IInitializable, IHasHierarchyObject, IEn
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of <see cref="IBehaviour"/>s to get.</typeparam>
|
||||
/// <returns>A list of <see cref="IBehaviour"/>s of the specified type.</returns>
|
||||
IList<T> GetBehaviours<T>();
|
||||
IReadOnlyList<T> GetBehaviours<T>();
|
||||
|
||||
/// <summary>
|
||||
/// Gets all <see cref="IBehaviour"/>s of the specified type and stores them in the provided list.
|
||||
|
@ -72,7 +72,7 @@ public class BehaviourController : IBehaviourController
|
||||
return default;
|
||||
}
|
||||
|
||||
public IList<T> GetBehaviours<T>()
|
||||
public IReadOnlyList<T> GetBehaviours<T>()
|
||||
{
|
||||
List<T>? behaviours = null;
|
||||
foreach (IBehaviour behaviourItem in this.behaviours)
|
||||
|
Loading…
x
Reference in New Issue
Block a user