feat: IActive interface added for hierarchy active state
This commit is contained in:
@@ -66,6 +66,7 @@ public class BehaviourCollector<T> : IBehaviourCollector<T> where T : class
|
||||
OnRemoved?.Invoke(this, tBehaviour);
|
||||
}
|
||||
|
||||
protected virtual void OnAssign(IGameManager gameManager) { }
|
||||
public bool Assign(IGameManager gameManager)
|
||||
{
|
||||
if (GameManager is not null)
|
||||
@@ -78,6 +79,7 @@ public class BehaviourCollector<T> : IBehaviourCollector<T> where T : class
|
||||
gameManager.OnHierarchyObjectUnRegistered += OnHierarchyObjectUnregistered;
|
||||
|
||||
GameManager = gameManager;
|
||||
OnAssign(gameManager);
|
||||
OnGameManagerAssigned?.Invoke(this);
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user