迁移剩下的 UI 到 Serialization 方式

This commit is contained in:
2026-09-14 17:19:31 +08:00
parent 091a29db63
commit b628a8537c
107 changed files with 4147 additions and 3680 deletions
@@ -0,0 +1,55 @@
//------------------------------------------------------------------------------
// <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 Luban;
namespace SepCore.Definition
{
public sealed partial class FormatText : Luban.BeanBase
{
public FormatText(ByteBuf _buf)
{
Name = _buf.ReadString();
Format = _buf.ReadString();
}
public static FormatText DeserializeFormatText(ByteBuf _buf)
{
return new FormatText(_buf);
}
/// <summary>
/// 文本名
/// </summary>
public readonly string Name;
/// <summary>
/// 格式化字符串
/// </summary>
public readonly string Format;
public const int __ID__ = -1977697820;
public override int GetTypeId() => __ID__;
public void ResolveRef(Tables tables)
{
}
public override string ToString()
{
return "{ "
+ "name:" + Name + ","
+ "format:" + Format + ","
+ "}";
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 721766cc68542b640a2119ab0c73a833
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -21,6 +21,7 @@ public partial class Tables
/// 实体配置
/// </summary>
public TbEntityConfig TbEntityConfig {get; }
public TbFormatText TbFormatText {get; }
/// <summary>
/// 全局零散配置(单例)
/// </summary>
@@ -65,6 +66,7 @@ public partial class Tables
{
TbEnemyConfig = new TbEnemyConfig(loader("tbenemyconfig"));
TbEntityConfig = new TbEntityConfig(loader("tbentityconfig"));
TbFormatText = new TbFormatText(loader("tbformattext"));
TbGlobalConfig = new TbGlobalConfig(loader("tbglobalconfig"));
TbGoodsConfig = new TbGoodsConfig(loader("tbgoodsconfig"));
TbLevelConfig = new TbLevelConfig(loader("tblevelconfig"));
@@ -87,6 +89,7 @@ public partial class Tables
{
TbEnemyConfig.ResolveRef(this);
TbEntityConfig.ResolveRef(this);
TbFormatText.ResolveRef(this);
TbGlobalConfig.ResolveRef(this);
TbGoodsConfig.ResolveRef(this);
TbLevelConfig.ResolveRef(this);
@@ -0,0 +1,52 @@
//------------------------------------------------------------------------------
// <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 Luban;
namespace SepCore.Definition
{
public partial class TbFormatText
{
private readonly System.Collections.Generic.Dictionary<string, FormatText> _dataMap;
private readonly System.Collections.Generic.List<FormatText> _dataList;
public TbFormatText(ByteBuf _buf)
{
_dataMap = new System.Collections.Generic.Dictionary<string, FormatText>();
_dataList = new System.Collections.Generic.List<FormatText>();
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
FormatText _v;
_v = FormatText.DeserializeFormatText(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Name, _v);
}
}
public System.Collections.Generic.Dictionary<string, FormatText> DataMap => _dataMap;
public System.Collections.Generic.List<FormatText> DataList => _dataList;
public FormatText GetOrDefault(string key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public FormatText Get(string key) => _dataMap[key];
public FormatText this[string key] => _dataMap[key];
public void ResolveRef(Tables tables)
{
foreach(var _v in _dataList)
{
_v.ResolveRef(tables);
}
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8574165ef5ddc674fb6c69eaab38a63e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: