Start TEngine3.0

Start TEngine3.0
This commit is contained in:
ALEXTANG
2023-03-31 17:27:49 +08:00
parent 179765c43c
commit 36353294d6
1032 changed files with 21868 additions and 102407 deletions

View File

@@ -0,0 +1,48 @@
using Bright.Serialization;
using SimpleJSON;
{{
name = x.name
namespace = x.namespace
tables = x.tables
}}
{{cs_start_name_space_grace x.namespace}}
public sealed partial class {{name}}
{
{{~for table in tables ~}}
{{~if table.comment != '' ~}}
/// <summary>
/// {{table.escape_comment}}
/// </summary>
{{~end~}}
public {{table.full_name}} {{table.name}} {get; }
{{~end~}}
public {{name}}(System.Func<string, JSONNode> loader)
{
var tables = new System.Collections.Generic.Dictionary<string, object>();
{{~for table in tables ~}}
{{table.name}} = new {{table.full_name}}(loader("{{table.output_data_file}}"));
tables.Add("{{table.full_name}}", {{table.name}});
{{~end~}}
PostInit();
{{~for table in tables ~}}
{{table.name}}.Resolve(tables);
{{~end~}}
PostResolve();
}
public void TranslateText(System.Func<string, string, string> translator)
{
{{~for table in tables ~}}
{{table.name}}.TranslateText(translator);
{{~end~}}
}
partial void PostInit();
partial void PostResolve();
}
{{cs_end_name_space_grace x.namespace}}