Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Tables.cs

70 lines
2.2 KiB
C#
Raw Normal View History

2024-06-12 15:01:54 +08:00
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Bright.Serialization;
using SimpleJSON;
using Framework;
using System;
namespace cfg
{
public sealed partial class Tables
{
public StringCfg.StringConfig StringConfig {get; }
public AD.ADConfig ADConfig {get; }
public Prop.PropConfig PropConfig {get; }
public Guide.GuideConfig GuideConfig {get; }
2024-06-12 15:01:54 +08:00
public Tables(System.Func<string, JSONNode> loader)
{
var tables = new System.Collections.Generic.Dictionary<string, object>();
StringConfig = new StringCfg.StringConfig(loader("stringcfg_stringconfig"));
tables.Add("StringCfg.StringConfig", StringConfig);
ADConfig = new AD.ADConfig(loader("ad_adconfig"));
tables.Add("AD.ADConfig", ADConfig);
PropConfig = new Prop.PropConfig(loader("prop_propconfig"));
tables.Add("Prop.PropConfig", PropConfig);
GuideConfig = new Guide.GuideConfig(loader("guide_guideconfig"));
tables.Add("Guide.GuideConfig", GuideConfig);
2024-06-12 15:01:54 +08:00
PostInit();
StringConfig.Resolve(tables);
ADConfig.Resolve(tables);
PropConfig.Resolve(tables);
GuideConfig.Resolve(tables);
2024-06-12 15:01:54 +08:00
PostResolve();
}
public static void PostPreload(Action<string> loader) {
loader("stringcfg_stringconfig");
loader("ad_adconfig");
loader("prop_propconfig");
loader("guide_guideconfig");
2024-06-12 15:01:54 +08:00
}
public static void AfterLoaded(Action<string> loader) {
loader("stringcfg_stringconfig");
loader("ad_adconfig");
loader("prop_propconfig");
loader("guide_guideconfig");
2024-06-12 15:01:54 +08:00
}
public void TranslateText(System.Func<string, string, string> translator)
{
StringConfig.TranslateText(translator);
ADConfig.TranslateText(translator);
PropConfig.TranslateText(translator);
GuideConfig.TranslateText(translator);
2024-06-12 15:01:54 +08:00
}
partial void PostInit();
partial void PostResolve();
}
}