添加 SepCore.Runtime 和 SepCore.Base 程序集
- 暂时将 Entity 全部归进 Runtime 程序集里 - 调整部分 UI 的 UseCase/RawData/Context 之间的关系,让 RawData 更接近业务原始数据,Context 更接近 UI 直接可读的数据 - 调整其他程序集的引用关系
This commit is contained in:
@@ -92,9 +92,6 @@ namespace Procedure
|
||||
LoadDataTable(dataTableName);
|
||||
}
|
||||
|
||||
// Preload dictionaries
|
||||
LoadDictionary("Default");
|
||||
|
||||
// Preload fonts
|
||||
LoadFont("MainFont");
|
||||
LoadTMPFont("MainTMPFont");
|
||||
@@ -114,47 +111,42 @@ namespace Procedure
|
||||
GameEntry.DataTable.LoadDataTable(dataTableName, dataTableAssetName, this);
|
||||
}
|
||||
|
||||
private void LoadDictionary(string dictionaryName)
|
||||
{
|
||||
string dictionaryAssetName = AssetUtility.GetDictionaryAsset(dictionaryName, false);
|
||||
_loadedFlag.Add(dictionaryAssetName, false);
|
||||
GameEntry.Localization.ReadData(dictionaryAssetName, this);
|
||||
}
|
||||
|
||||
private void LoadFont(string fontName)
|
||||
{
|
||||
_loadedFlag.Add(Utility.Text.Format("Font.{0}", fontName), false);
|
||||
GameEntry.Resource.LoadAsset(AssetUtility.GetFontAsset(fontName), Constant.AssetPriority.FontAsset, new LoadAssetCallbacks(
|
||||
(assetName, asset, duration, userData) =>
|
||||
{
|
||||
_loadedFlag[Utility.Text.Format("Font.{0}", fontName)] = true;
|
||||
UGuiForm.SetMainFont((Font)asset);
|
||||
Log.Info("Load font '{0}' OK.", fontName);
|
||||
},
|
||||
|
||||
(assetName, status, errorMessage, userData) =>
|
||||
{
|
||||
Log.Error("Can not load font '{0}' from '{1}' with error message '{2}'.", fontName, assetName, errorMessage);
|
||||
}));
|
||||
GameEntry.Resource.LoadAsset(AssetUtility.GetFontAsset(fontName), Constant.AssetPriority.FontAsset,
|
||||
new LoadAssetCallbacks(
|
||||
(assetName, asset, duration, userData) =>
|
||||
{
|
||||
_loadedFlag[Utility.Text.Format("Font.{0}", fontName)] = true;
|
||||
UGuiForm.SetMainFont((Font)asset);
|
||||
Log.Info("Load font '{0}' OK.", fontName);
|
||||
},
|
||||
(assetName, status, errorMessage, userData) =>
|
||||
{
|
||||
Log.Error("Can not load font '{0}' from '{1}' with error message '{2}'.", fontName, assetName,
|
||||
errorMessage);
|
||||
}));
|
||||
}
|
||||
|
||||
private void LoadTMPFont(string fontName)
|
||||
{
|
||||
_loadedFlag.Add(Utility.Text.Format("Font.{0}", fontName), false);
|
||||
GameEntry.Resource.LoadAsset(AssetUtility.GetTMPFontAsset(fontName), Constant.AssetPriority.FontAsset, new LoadAssetCallbacks(
|
||||
(assetName, asset, duration, userData) =>
|
||||
{
|
||||
_loadedFlag[Utility.Text.Format("Font.{0}", fontName)] = true;
|
||||
UGuiForm.SetMainTMPFont((TMP_FontAsset)asset);
|
||||
Log.Info("Load font '{0}' OK.", fontName);
|
||||
},
|
||||
|
||||
(assetName, status, errorMessage, userData) =>
|
||||
{
|
||||
Log.Error("Can not load font '{0}' from '{1}' with error message '{2}'.", fontName, assetName, errorMessage);
|
||||
}));
|
||||
GameEntry.Resource.LoadAsset(AssetUtility.GetTMPFontAsset(fontName), Constant.AssetPriority.FontAsset,
|
||||
new LoadAssetCallbacks(
|
||||
(assetName, asset, duration, userData) =>
|
||||
{
|
||||
_loadedFlag[Utility.Text.Format("Font.{0}", fontName)] = true;
|
||||
UGuiForm.SetMainTMPFont((TMP_FontAsset)asset);
|
||||
Log.Info("Load font '{0}' OK.", fontName);
|
||||
},
|
||||
(assetName, status, errorMessage, userData) =>
|
||||
{
|
||||
Log.Error("Can not load font '{0}' from '{1}' with error message '{2}'.", fontName, assetName,
|
||||
errorMessage);
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
private void OnLoadConfigSuccess(object sender, GameEventArgs e)
|
||||
{
|
||||
LoadConfigSuccessEventArgs ne = (LoadConfigSuccessEventArgs)e;
|
||||
@@ -175,7 +167,8 @@ namespace Procedure
|
||||
return;
|
||||
}
|
||||
|
||||
Log.Error("Can not load config '{0}' from '{1}' with error message '{2}'.", ne.ConfigAssetName, ne.ConfigAssetName, ne.ErrorMessage);
|
||||
Log.Error("Can not load config '{0}' from '{1}' with error message '{2}'.", ne.ConfigAssetName,
|
||||
ne.ConfigAssetName, ne.ErrorMessage);
|
||||
}
|
||||
|
||||
private void OnLoadDataTableSuccess(object sender, GameEventArgs e)
|
||||
@@ -198,7 +191,8 @@ namespace Procedure
|
||||
return;
|
||||
}
|
||||
|
||||
Log.Error("Can not load data table '{0}' from '{1}' with error message '{2}'.", ne.DataTableAssetName, ne.DataTableAssetName, ne.ErrorMessage);
|
||||
Log.Error("Can not load data table '{0}' from '{1}' with error message '{2}'.", ne.DataTableAssetName,
|
||||
ne.DataTableAssetName, ne.ErrorMessage);
|
||||
}
|
||||
|
||||
private void OnLoadDictionarySuccess(object sender, GameEventArgs e)
|
||||
@@ -221,7 +215,8 @@ namespace Procedure
|
||||
return;
|
||||
}
|
||||
|
||||
Log.Error("Can not load dictionary '{0}' from '{1}' with error message '{2}'.", ne.DictionaryAssetName, ne.DictionaryAssetName, ne.ErrorMessage);
|
||||
Log.Error("Can not load dictionary '{0}' from '{1}' with error message '{2}'.", ne.DictionaryAssetName,
|
||||
ne.DictionaryAssetName, ne.ErrorMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user