继续调整,创建 Procedure 与 Presentation 程序集

- 创建 Procedure 与 Presentation 两个程序集
- 初步解决这两个程序集与原程序集的引用关系
This commit is contained in:
SepComet
2026-06-02 23:26:08 +08:00
parent affa44e4d0
commit 6b8a6a8789
50 changed files with 907 additions and 688 deletions
@@ -1,11 +1,4 @@
//------------------------------------------------------------
// Game Framework
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
// Homepage: https://gameframework.cn/
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------
using GameFramework;
using GameFramework;
using GameFramework.Event;
using GameFramework.Resource;
using System.Collections.Generic;
@@ -2,7 +2,6 @@ using GameFramework;
using GameFramework.Event;
using System.Collections.Generic;
using SepCore.Definition;
using StarForce;
using UI;
using UnityEngine;
using UnityGameFramework.Runtime;
@@ -19,13 +18,7 @@ namespace Procedure
private List<UpdateLengthData> m_UpdateLengthData = new List<UpdateLengthData>();
private UpdateResourceForm m_UpdateResourceForm = null;
public override bool UseNativeDialog
{
get
{
return true;
}
}
public override bool UseNativeDialog => true;
protected override void OnEnter(ProcedureOwner procedureOwner)
{
@@ -55,7 +48,10 @@ namespace Procedure
ConfirmText = GameEntry.Localization.GetString("UpdateResourceViaCarrierDataNetwork.UpdateButton"),
OnClickConfirm = StartUpdateResources,
CancelText = GameEntry.Localization.GetString("UpdateResourceViaCarrierDataNetwork.QuitButton"),
OnClickCancel = delegate (object userData) { UnityGameFramework.Runtime.GameEntry.Shutdown(ShutdownType.Quit); },
OnClickCancel = delegate(object userData)
{
UnityGameFramework.Runtime.GameEntry.Shutdown(ShutdownType.Quit);
},
});
return;
@@ -96,7 +92,8 @@ namespace Procedure
{
if (m_UpdateResourceForm == null)
{
m_UpdateResourceForm = Object.Instantiate(GameEntry.BuiltinData.UpdateResourceFormTemplate);
m_UpdateResourceForm = Object.Instantiate(GameEntry.BuiltinData.UpdateResourceFormTemplate)
.GetComponent<UpdateResourceForm>();
}
Log.Info("Start update resources...");
@@ -112,7 +109,10 @@ namespace Procedure
}
float progressTotal = (float)currentTotalUpdateLength / m_UpdateTotalCompressedLength;
string descriptionText = GameEntry.Localization.GetString("UpdateResource.Tips", m_UpdateSuccessCount.ToString(), m_UpdateCount.ToString(), GetByteLengthString(currentTotalUpdateLength), GetByteLengthString(m_UpdateTotalCompressedLength), progressTotal, GetByteLengthString((int)GameEntry.Download.CurrentSpeed));
string descriptionText = GameEntry.Localization.GetString("UpdateResource.Tips",
m_UpdateSuccessCount.ToString(), m_UpdateCount.ToString(),
GetByteLengthString(currentTotalUpdateLength), GetByteLengthString(m_UpdateTotalCompressedLength),
progressTotal, GetByteLengthString((int)GameEntry.Download.CurrentSpeed));
m_UpdateResourceForm.SetProgress(progressTotal, descriptionText);
}
@@ -223,12 +223,14 @@ namespace Procedure
ResourceUpdateFailureEventArgs ne = (ResourceUpdateFailureEventArgs)e;
if (ne.RetryCount >= ne.TotalRetryCount)
{
Log.Error("Update resource '{0}' failure from '{1}' with error message '{2}', retry count '{3}'.", ne.Name, ne.DownloadUri, ne.ErrorMessage, ne.RetryCount.ToString());
Log.Error("Update resource '{0}' failure from '{1}' with error message '{2}', retry count '{3}'.",
ne.Name, ne.DownloadUri, ne.ErrorMessage, ne.RetryCount.ToString());
return;
}
else
{
Log.Info("Update resource '{0}' failure from '{1}' with error message '{2}', retry count '{3}'.", ne.Name, ne.DownloadUri, ne.ErrorMessage, ne.RetryCount.ToString());
Log.Info("Update resource '{0}' failure from '{1}' with error message '{2}', retry count '{3}'.",
ne.Name, ne.DownloadUri, ne.ErrorMessage, ne.RetryCount.ToString());
}
for (int i = 0; i < m_UpdateLengthData.Count; i++)
@@ -255,17 +257,10 @@ namespace Procedure
public string Name
{
get
{
return m_Name;
}
get { return m_Name; }
}
public int Length
{
get;
set;
}
public int Length { get; set; }
}
}
}
@@ -22,7 +22,7 @@ namespace Procedure
_procedureGame = master;
var useCase = new LevelUpFormUseCase(_procedureGame.Player, this);
var useCase = new LevelUpFormUseCase(_procedureGame.Player, () => IsCompleted = true);
GameEntry.UIRouter.BindUIUseCase(UIFormType.LevelUpForm, useCase);
}
@@ -21,7 +21,7 @@ namespace Procedure
Log.Debug("GameStateShop::OnInit");
_procedureGame = master;
var shopFormUseCase = new ShopFormUseCase(_procedureGame, this);
var shopFormUseCase = new ShopFormUseCase(_procedureGame.Player, _procedureGame.CurrentLevel, () => ShopFinish = true);
GameEntry.UIRouter.BindUIUseCase(UIFormType.ShopForm, shopFormUseCase);
}
@@ -28,7 +28,7 @@ namespace Procedure
GameEntry.UIRouter.OpenUI(UIFormType.StartMenuForm);
var useCase2 = new SelectRoleFormUseCase(this);
var useCase2 = new SelectRoleFormUseCase(roleId => StartGame(roleId));
GameEntry.UIRouter.BindUIUseCase(UIFormType.SelectRoleForm, useCase2);
QualitySettings.vSyncCount = 0;
@@ -0,0 +1,19 @@
{
"name": "SepCore.Procedure",
"rootNamespace": "SepCore.Procedure",
"references": [
"GUID:363c5eb08ff8e6a439b85e37b8c20d96",
"GUID:47a82ffa13c291447ab895cd0bc251cd",
"GUID:0e1d182005e0ae647ab3fa40f5492dbb",
"GUID:6055be8ebefd69e48b49212b09b47b2f"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 6f6ea874d7669044095abb01ec4c2f8d
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: