refactor: made factories static

This commit is contained in:
2025-04-01 12:18:33 +03:00
parent 9f3e39e337
commit 067bc51487
9 changed files with 16 additions and 27 deletions

View File

@@ -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>()
{