diff --git a/Engine.Core/BehaviourCollector.cs b/Engine.Core/BehaviourCollector.cs index bd6e562..7fbc470 100644 --- a/Engine.Core/BehaviourCollector.cs +++ b/Engine.Core/BehaviourCollector.cs @@ -68,11 +68,7 @@ public class BehaviourCollector : IAssignableGameManager, IEnumerable return false; foreach (IGameObject gameObject in gameManager) - { OnGameObjectRegistered(gameManager, gameObject); - foreach (IBehaviour behaviour in gameObject.BehaviourController) - OnBehaviourAdded(gameObject.BehaviourController, behaviour); - } gameManager.OnGameObjectRegistered += OnGameObjectRegistered; gameManager.OnGameObjectUnRegistered += OnGameObjectUnregistered; @@ -89,11 +85,7 @@ public class BehaviourCollector : IAssignableGameManager, IEnumerable return false; foreach (IGameObject gameObject in GameManager) - { OnGameObjectUnregistered(GameManager, gameObject); - foreach (IBehaviour behaviour in gameObject.BehaviourController) - OnBehaviourRemoved(gameObject.BehaviourController, behaviour); - } GameManager.OnGameObjectRegistered -= OnGameObjectRegistered; GameManager.OnGameObjectUnRegistered -= OnGameObjectUnregistered;