mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
67 lines
2.0 KiB
C#
67 lines
2.0 KiB
C#
//------------------------------------------------------------------------------
|
|
// <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 Cysharp.Threading.Tasks;
|
|
using System.Collections.Generic;
|
|
|
|
|
|
namespace GameConfig
|
|
{
|
|
|
|
public sealed class Tables
|
|
{
|
|
public item.TbItem TbItem {get; private set; }
|
|
public Battle.TbSkill TbSkill {get; private set; }
|
|
public Battle.TbBuff TbBuff {get; private set; }
|
|
public Battle.TbBuffAttr TbBuffAttr {get; private set; }
|
|
|
|
public Tables() { }
|
|
|
|
public async UniTask LoadAsync(System.Func<string, UniTask<ByteBuf>> loader)
|
|
{
|
|
var tables = new System.Collections.Generic.Dictionary<string, object>();
|
|
List<UniTask> list = new List<UniTask>();
|
|
list.Add(UniTask.Create(async () =>
|
|
{
|
|
TbItem = new item.TbItem(await loader("item_tbitem"));
|
|
tables.Add("item.TbItem", TbItem);
|
|
}));
|
|
list.Add(UniTask.Create(async () =>
|
|
{
|
|
TbSkill = new Battle.TbSkill(await loader("battle_tbskill"));
|
|
tables.Add("Battle.TbSkill", TbSkill);
|
|
}));
|
|
list.Add(UniTask.Create(async () =>
|
|
{
|
|
TbBuff = new Battle.TbBuff(await loader("battle_tbbuff"));
|
|
tables.Add("Battle.TbBuff", TbBuff);
|
|
}));
|
|
list.Add(UniTask.Create(async () =>
|
|
{
|
|
TbBuffAttr = new Battle.TbBuffAttr(await loader("battle_tbbuffattr"));
|
|
tables.Add("Battle.TbBuffAttr", TbBuffAttr);
|
|
}));
|
|
|
|
await UniTask.WhenAll(list);
|
|
|
|
TbItem.Resolve(tables);
|
|
TbSkill.Resolve(tables);
|
|
TbBuff.Resolve(tables);
|
|
TbBuffAttr.Resolve(tables);
|
|
}
|
|
|
|
public void TranslateText(System.Func<string, string, string> translator)
|
|
{
|
|
TbItem.TranslateText(translator);
|
|
TbSkill.TranslateText(translator);
|
|
TbBuff.TranslateText(translator);
|
|
TbBuffAttr.TranslateText(translator);
|
|
}
|
|
}
|
|
|
|
} |