refactor: behaviour factory universe object parameter removed

This commit is contained in:
2025-05-18 00:38:49 +03:00
parent 0bf38234c6
commit 3b6a93d37a
2 changed files with 7 additions and 6 deletions

View File

@@ -36,7 +36,10 @@ public class BehaviourController : BaseEntity, IBehaviourController
}
public T AddBehaviour<T>(params object?[]? args) where T : class, IBehaviour
=> AddBehaviour(Factory.BehaviourFactory.Instantiate<T>(_universeObject, args));
{
T behaviour = Factory.BehaviourFactory.Instantiate<T>(args);
return AddBehaviour(behaviour);
}
public T? GetBehaviour<T>()
{