refactor: ITransformWithGameObject

This commit is contained in:
2024-02-06 12:57:01 +03:00
parent fed288859f
commit f96c58cbd4
5 changed files with 47 additions and 29 deletions

View File

@@ -9,7 +9,7 @@ public class GameObjectFactory
=> Instantiate<T>(transform: null, behaviourController: null, stateEnable: null, args);
public T Instantiate<T>(
ITransform? transform = null,
ITransformWithGameObject? transform = null,
IBehaviourController? behaviourController = null,
IStateEnable? stateEnable = null,
params object?[]? args
@@ -18,7 +18,7 @@ public class GameObjectFactory
{
T gameObject = TypeFactory.Get<T>(args);
transform ??= TypeFactory.Get<Transform>();
transform ??= TypeFactory.Get<TransformWithGameObject>();
behaviourController ??= TypeFactory.Get<BehaviourController>();
stateEnable ??= TypeFactory.Get<StateEnable>();