mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
Update HotUpdate
Update HotUpdate
This commit is contained in:
@@ -170,7 +170,7 @@ MonoBehaviour:
|
|||||||
m_SelectOnRight: {fileID: 0}
|
m_SelectOnRight: {fileID: 0}
|
||||||
m_Transition: 1
|
m_Transition: 1
|
||||||
m_Colors:
|
m_Colors:
|
||||||
m_NormalColor: {r: 1, g: 0.90310204, b: 0, a: 1}
|
m_NormalColor: {r: 0.9716981, g: 0, b: 0.12772757, a: 1}
|
||||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||||
|
@@ -9,9 +9,11 @@ namespace TEngine
|
|||||||
{
|
{
|
||||||
public class Launcher:MonoBehaviour
|
public class Launcher:MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
TLogger.Instance.Active();
|
TLogger.Instance.Active();
|
||||||
|
LoadMgr.Instance.InitParam("http://1.12.241.46:8081/TXYXGame/",isTestUpdate:true);
|
||||||
LoadMgr.Instance.StartLoadInit(LaunchSuccess);
|
LoadMgr.Instance.StartLoadInit(LaunchSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -30,6 +30,8 @@ namespace TEngine
|
|||||||
|
|
||||||
public class LoadMgr : TSingleton<LoadMgr>
|
public class LoadMgr : TSingleton<LoadMgr>
|
||||||
{
|
{
|
||||||
|
private bool _isTestUpdate = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 资源版本号
|
/// 资源版本号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -63,6 +65,12 @@ namespace TEngine
|
|||||||
return _instance._loaderUpdateLaunched;
|
return _instance._loaderUpdateLaunched;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void InitParam(string url,bool isTestUpdate = false)
|
||||||
|
{
|
||||||
|
Url = url;
|
||||||
|
_isTestUpdate = isTestUpdate;
|
||||||
|
}
|
||||||
|
|
||||||
public void StartLoadInit(Action onUpdateComplete)
|
public void StartLoadInit(Action onUpdateComplete)
|
||||||
{
|
{
|
||||||
//热更新阶段文本初始化
|
//热更新阶段文本初始化
|
||||||
@@ -81,6 +89,11 @@ namespace TEngine
|
|||||||
#if RELEASE_BUILD || _DEVELOPMENT_BUILD_
|
#if RELEASE_BUILD || _DEVELOPMENT_BUILD_
|
||||||
StartLoad(() => { FinishCallBack(onUpdateComplete); });
|
StartLoad(() => { FinishCallBack(onUpdateComplete); });
|
||||||
#else
|
#else
|
||||||
|
if (_isTestUpdate)
|
||||||
|
{
|
||||||
|
StartLoad(() => { FinishCallBack(onUpdateComplete); });
|
||||||
|
return;
|
||||||
|
}
|
||||||
onUpdateComplete?.Invoke();
|
onUpdateComplete?.Invoke();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -139,7 +152,7 @@ namespace TEngine
|
|||||||
}
|
}
|
||||||
|
|
||||||
UILoadMgr.Show(UIDefine.UILoadUpdate, string.Format(LoadText.Instance.Label_Load_Checking, _curTryCount));
|
UILoadMgr.Show(UIDefine.UILoadUpdate, string.Format(LoadText.Instance.Label_Load_Checking, _curTryCount));
|
||||||
if (string.IsNullOrEmpty(OnlineParamUrl))
|
if (string.IsNullOrEmpty(Url) || string.IsNullOrEmpty(OnlineParamUrl))
|
||||||
{
|
{
|
||||||
TLogger.LogError("LoadMgr.RequestVersion, remote url is empty or null");
|
TLogger.LogError("LoadMgr.RequestVersion, remote url is empty or null");
|
||||||
LoaderUtilities.ShowMessageBox(LoadText.Instance.Label_RemoteUrlisNull, MessageShowType.OneButton,
|
LoaderUtilities.ShowMessageBox(LoadText.Instance.Label_RemoteUrlisNull, MessageShowType.OneButton,
|
||||||
@@ -511,7 +524,7 @@ namespace TEngine
|
|||||||
|
|
||||||
private string _resListUrl = string.Empty;
|
private string _resListUrl = string.Empty;
|
||||||
private string _onlineParamUrl = string.Empty;
|
private string _onlineParamUrl = string.Empty;
|
||||||
internal const string Url = "http://1.12.241.46:8081/TXYXGame/";
|
internal string Url = string.Empty;
|
||||||
|
|
||||||
internal string ResListUrl
|
internal string ResListUrl
|
||||||
{
|
{
|
||||||
|
@@ -39,7 +39,7 @@ namespace TEngine.UI
|
|||||||
public string Label_DownLoadFailed = "网络太慢,是否继续下载";
|
public string Label_DownLoadFailed = "网络太慢,是否继续下载";
|
||||||
public string Label_ClearConfig = "清除环境配置,需要重启应用";
|
public string Label_ClearConfig = "清除环境配置,需要重启应用";
|
||||||
public string Label_RegionInfoIllegal = "区服信息为空";
|
public string Label_RegionInfoIllegal = "区服信息为空";
|
||||||
public string Label_RemoteUrlisNull = "热更新服地址为空";
|
public string Label_RemoteUrlisNull = "热更地址为空";
|
||||||
public string Label_FirstPackageNotFound = "首包资源加载失败";
|
public string Label_FirstPackageNotFound = "首包资源加载失败";
|
||||||
public string Label_RequestReginInfo = "正在请求区服信息{0}次";
|
public string Label_RequestReginInfo = "正在请求区服信息{0}次";
|
||||||
public string Label_RequestTimeOut = "请求区服信息超时,是否重试?";
|
public string Label_RequestTimeOut = "请求区服信息超时,是否重试?";
|
||||||
@@ -57,18 +57,19 @@ namespace TEngine.UI
|
|||||||
public string Label_Dlc_ConfigLoadingStage = "下载配置中...";
|
public string Label_Dlc_ConfigLoadingStage = "下载配置中...";
|
||||||
public string Label_Dlc_AssetsLoading = "下载资源中...";
|
public string Label_Dlc_AssetsLoading = "下载资源中...";
|
||||||
public string Label_Dlc_LoadingFinish = "下载结束";
|
public string Label_Dlc_LoadingFinish = "下载结束";
|
||||||
|
|
||||||
public string Label_Dlc_Load_Force_WIFI =
|
public string Label_Dlc_Load_Force_WIFI =
|
||||||
"检测到有新的游戏内容需要更新, 取消更新将导致无法进入游戏,您当前已为<color=#BA3026>wifi网络</color>,请开始更新";
|
"检测到有新的游戏内容需要更新, 取消更新将导致无法进入游戏,您当前已为<color=#BA3026>wifi网络</color>,请开始更新";
|
||||||
public string Label_Dlc_Load_Force_NO_WIFI =
|
public string Label_Dlc_Load_Force_NO_WIFI =
|
||||||
"检测到有新的游戏内容需要更新, 取消更新将导致无法进入游戏,请开始更新";
|
"检测到有新的游戏内容需要更新, 取消更新将导致无法进入游戏,请开始更新";
|
||||||
}
|
}
|
||||||
|
|
||||||
public class LoadText: TextMode
|
public class LoadText : TextMode
|
||||||
{
|
{
|
||||||
private static LoadText _instance;
|
private static LoadText _instance;
|
||||||
|
|
||||||
public static LoadText Instance {
|
public static LoadText Instance
|
||||||
|
{
|
||||||
get { return _instance ?? (_instance = new LoadText()); }
|
get { return _instance ?? (_instance = new LoadText()); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user