feat!: GetRequiredBehaviour/HierarchyObject methods added for cleaner null handling
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Syntriax.Engine.Core.Abstract;
|
||||
using Syntriax.Engine.Core.Exceptions;
|
||||
using Syntriax.Engine.Core.Helpers;
|
||||
|
||||
namespace Syntriax.Engine.Core;
|
||||
|
||||
@@ -69,9 +70,8 @@ public abstract class BehaviourBase : BaseEntity, IBehaviour
|
||||
|
||||
protected override void InitializeInternal()
|
||||
{
|
||||
base.InitializeInternal();
|
||||
NotAssignedException.Check(this, _behaviourController);
|
||||
NotAssignedException.Check(this, StateEnable);
|
||||
AssertHelpers.AssertBehaviourControllerAssigned(this);
|
||||
AssertHelpers.AssertStateEnableAssigned(this);
|
||||
}
|
||||
|
||||
private void OnStateEnabledChanged(IStateEnable sender, bool previousState) => UpdateActive();
|
||||
|
Reference in New Issue
Block a user