mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Luban;
|
||||
using SimpleJSON;
|
||||
|
||||
{{namespace_with_grace_begin __namespace}}
|
||||
public partial class {{__name}}
|
||||
{
|
||||
{{~for table in __tables ~}}
|
||||
{{~if table.comment != '' ~}}
|
||||
/// <summary>
|
||||
/// {{escape_comment table.comment}}
|
||||
/// </summary>
|
||||
{{~end~}}
|
||||
public {{table.full_name}} {{format_property_name __code_style table.name}} { get; private set; }
|
||||
{{~end~}}
|
||||
|
||||
public readonly int Count = {{ __tables | array.size }};
|
||||
|
||||
public Tables() { }
|
||||
|
||||
public async UniTask LoadAsync(System.Func<string, UniTask<ByteBuf>> loader)
|
||||
{
|
||||
{{~for table in __tables ~}}
|
||||
{{format_property_name __code_style table.name}} = new {{table.full_name}}(await loader("{{table.output_data_file}}"));
|
||||
{{~end~}}
|
||||
ResolveRef();
|
||||
}
|
||||
|
||||
private void ResolveRef()
|
||||
{
|
||||
{{~for table in __tables ~}}
|
||||
{{format_property_name __code_style table.name}}.ResolveRef(this);
|
||||
{{~end~}}
|
||||
}
|
||||
}
|
||||
|
||||
{{namespace_with_grace_end __namespace}}
|
Reference in New Issue
Block a user