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

@@ -4,7 +4,7 @@ namespace Syntriax.Engine.Core.Factory;
public class TransformFactory
{
public ITransform2D Instantiate() => TypeFactory.Get<Transform2D>();
public T Instantiate<T>(params object?[]? args) where T : class, ITransform2D
public static ITransform2D Instantiate() => TypeFactory.Get<Transform2D>();
public static T Instantiate<T>(params object?[]? args) where T : class, ITransform2D
=> TypeFactory.Get<T>(args);
}