20 lines
472 B
C#
20 lines
472 B
C#
using Newtonsoft.Json.Linq;
|
|
|
|
namespace NBF;
|
|
|
|
public static class Configs
|
|
{
|
|
private static cfg.Tables _tables;
|
|
public static cfg.Tables Tables => _tables;
|
|
|
|
public static void Initialize()
|
|
{
|
|
_tables = new cfg.Tables(LoadJson);
|
|
}
|
|
|
|
private static JArray LoadJson(string file)
|
|
{
|
|
var gameConfigText = File.ReadAllText(Path.Combine(AppContext.BaseDirectory, "cfg", $"{file}.Json"));
|
|
return JArray.Parse(gameConfigText);
|
|
}
|
|
} |