Development Merge 2025.10.18 #4

Merged
Syntriax merged 91 commits from development into main 2025-10-18 10:03:13 +02:00
Showing only changes of commit 14843ddeba - Show all commits

View File

@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace Syntriax.Engine.Core;
@@ -50,17 +49,13 @@ public class BehaviourController : BaseEntity, IBehaviourController
public IReadOnlyList<T> GetBehaviours<T>()
{
List<T>? behaviours = null;
List<T> behaviours = [];
foreach (IBehaviour behaviourItem in this.behaviours)
{
if (behaviourItem is not T behaviour)
continue;
if (behaviourItem is T behaviour)
behaviours.Add(behaviour);
behaviours ??= [];
behaviours.Add(behaviour);
}
return behaviours ?? Enumerable.Empty<T>().ToList();
return behaviours;
}
public void GetBehaviours<T>(IList<T> results)