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

@@ -5,9 +5,9 @@ namespace Syntriax.Engine.Core.Factory;
public class StateEnableFactory
{
public IStateEnable Instantiate(IEntity entity) => Instantiate<StateEnable>(entity);
public static IStateEnable Instantiate(IEntity entity) => Instantiate<StateEnable>(entity);
public T Instantiate<T>(IEntity entity, params object?[]? args) where T : class, IStateEnable
public static T Instantiate<T>(IEntity entity, params object?[]? args) where T : class, IStateEnable
{
T stateEnable = TypeFactory.Get<T>(args);