fix:1、更换loading界面
2、修复bug,open等级添加 Signed-off-by: barry <barry@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
|
||||
using System.Linq;
|
||||
using DG.Tweening;
|
||||
using Newtonsoft.Json;
|
||||
using Spine.Unity;
|
||||
@@ -51,6 +51,8 @@ namespace RedHotRoast
|
||||
|
||||
if (GameHelper.IsGiftSwitch())
|
||||
{
|
||||
SetLevelText();
|
||||
|
||||
((FGUI.ZM_Common_01.com_open_tips)ui.com_tips).t0.Play(() =>
|
||||
{
|
||||
DOVirtual.DelayedCall(0.2f, () =>
|
||||
@@ -71,6 +73,41 @@ namespace RedHotRoast
|
||||
}
|
||||
}
|
||||
|
||||
private void SetLevelText()
|
||||
{
|
||||
try
|
||||
{
|
||||
// 添加空值检查,防止 NullReferenceException
|
||||
if (DataMgr.MakeupTaskHistory != null)
|
||||
{
|
||||
var makeupTaskHistory = DataMgr.MakeupTaskHistory?.Value;
|
||||
if (makeupTaskHistory != null && makeupTaskHistory.Any())
|
||||
{
|
||||
var makeupTaskData = makeupTaskHistory.Last();
|
||||
var config = MakeupModel.GetData(makeupTaskData.tableId);
|
||||
if (config != null)
|
||||
{
|
||||
var textLevelLimit = ((FGUI.ZM_Common_01.com_open_tips)ui.com_tips).text_level_limit;
|
||||
if (textLevelLimit != null)
|
||||
{
|
||||
var stage = config.levels_need - GameHelper.GetLevel();
|
||||
if (stage <= 0)
|
||||
{
|
||||
stage = 1;
|
||||
}
|
||||
textLevelLimit.SetVar("x", stage.ToString()).FlushVars();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user