迁移剩下的 UI 到 Serialization 方式
This commit is contained in:
@@ -20,6 +20,7 @@ namespace SepCore.CustomComponent
|
||||
{
|
||||
"tbenemyconfig",
|
||||
"tbentityconfig",
|
||||
"tbformattext",
|
||||
"tbglobalconfig",
|
||||
"tbgoodsconfig",
|
||||
"tblevelconfig",
|
||||
@@ -57,6 +58,11 @@ namespace SepCore.CustomComponent
|
||||
StringAccessor(tables => key => tables.TbEntityConfig.GetOrDefault(key),
|
||||
tables => tables.TbEntityConfig.DataList)
|
||||
},
|
||||
{
|
||||
typeof(FormatText),
|
||||
StringAccessor(tables => key => tables.TbFormatText.GetOrDefault(key),
|
||||
tables => tables.TbFormatText.DataList)
|
||||
},
|
||||
{
|
||||
typeof(GoodsConfig),
|
||||
Accessor(tables => id => tables.TbGoodsConfig.GetOrDefault(id),
|
||||
@@ -165,7 +171,7 @@ namespace SepCore.CustomComponent
|
||||
public bool IsReady => Tables != null;
|
||||
|
||||
public TbGlobalConfig Global => Tables.TbGlobalConfig;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 按 id 获取数据行,未找到时返回 null。
|
||||
/// </summary>
|
||||
@@ -191,6 +197,7 @@ namespace SepCore.CustomComponent
|
||||
{
|
||||
return (T)accessor.StringRowGetter(Tables, id.ToString());
|
||||
}
|
||||
|
||||
throw new NotSupportedException("Table for type '" + typeof(T).FullName + "' does not use an int key.");
|
||||
}
|
||||
|
||||
@@ -222,7 +229,9 @@ namespace SepCore.CustomComponent
|
||||
{
|
||||
return (T)accessor.RowGetter(Tables, parsedId);
|
||||
}
|
||||
throw new NotSupportedException("Table for type '" + typeof(T).FullName + "' does not use a string key.");
|
||||
|
||||
throw new NotSupportedException(
|
||||
"Table for type '" + typeof(T).FullName + "' does not use a string key.");
|
||||
}
|
||||
|
||||
return (T)accessor.StringRowGetter(Tables, key);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f228612923ff51343a4dab06ce4c1f92
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e4010de30b33144fa20400058edfeba
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6b12df2039d69e14aa018b259f3789cf
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 35c8961f073eae8479506bdec8b745f8
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user