refactor: made factories static
This commit is contained in:
@@ -52,7 +52,7 @@ public class BehaviourController : IBehaviourController
|
||||
InsertBehaviourByPriority(behaviour);
|
||||
|
||||
behaviour.Assign(this);
|
||||
behaviour.Assign(HierarchyObject.StateEnable);
|
||||
behaviour.Assign(Factory.StateEnableFactory.Instantiate(behaviour));
|
||||
|
||||
behaviour.Initialize();
|
||||
behaviour.OnPriorityChanged += OnPriorityChange;
|
||||
@@ -61,7 +61,7 @@ public class BehaviourController : IBehaviourController
|
||||
}
|
||||
|
||||
public T AddBehaviour<T>(params object?[]? args) where T : class, IBehaviour
|
||||
=> AddBehaviour(new Factory.BehaviourFactory().Instantiate<T>(_hierarchyObject, args));
|
||||
=> AddBehaviour(Factory.BehaviourFactory.Instantiate<T>(_hierarchyObject, args));
|
||||
|
||||
public T? GetBehaviour<T>()
|
||||
{
|
||||
|
Reference in New Issue
Block a user