继续调整,创建 Procedure 与 Presentation 程序集
- 创建 Procedure 与 Presentation 两个程序集 - 初步解决这两个程序集与原程序集的引用关系
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user