修改为luban
This commit is contained in:
20
Entity/Modules/ConfigTable/Configs.cs
Normal file
20
Entity/Modules/ConfigTable/Configs.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,6 @@ namespace NBF.ConfigTable
|
||||
/// </summary>
|
||||
public interface IConfigTable
|
||||
{
|
||||
public uint Key { get; }
|
||||
public int Key { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user