feat!: GetRequiredBehaviour/HierarchyObject methods added for cleaner null handling

This commit is contained in:
2025-04-13 12:52:27 +03:00
parent bfbcfdce4f
commit 86b8cd9b55
21 changed files with 140 additions and 73 deletions

View File

@@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.Linq;
using Syntriax.Engine.Core.Abstract;
using Syntriax.Engine.Core.Exceptions;
using Syntriax.Engine.Core.Helpers;
namespace Syntriax.Engine.Core;
@@ -141,7 +141,7 @@ public class BehaviourController : IBehaviourController
if (IsInitialized)
return false;
NotAssignedException.Check(this, _hierarchyObject);
AssertHelpers.AssertHierarchyObjectAssigned(this);
foreach (IBehaviour behaviour in behaviours)
behaviour.Initialize();