namespace DoomDeathmatch.Script.Provider;

public class GeneratorValueProvider<T>(Func<T> parGenerator) : IValueProvider<T>
{
  public T GetValue() => parGenerator();

  public static GeneratorValueProvider<T> Create(Func<T> parGenerator) => new(parGenerator);
  public static implicit operator GeneratorValueProvider<T>(Func<T> parGenerator) => new(parGenerator);
}