1
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BITKit
|
||||
@@ -9,4 +11,22 @@ namespace BITKit
|
||||
string GetConfig(params object[] args);
|
||||
void Configure(params object[] args);
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class ConfigProviders:IConfigProvider
|
||||
{
|
||||
[SerializeReference,SubclassSelector] private IConfigProvider[] providers;
|
||||
public string GetConfig(params object[] args)
|
||||
{
|
||||
return string.Join("\n",providers.Select(x=>x.GetConfig(args)));
|
||||
}
|
||||
|
||||
public void Configure(params object[] args)
|
||||
{
|
||||
foreach (var provider in providers)
|
||||
{
|
||||
provider.Configure(args);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user