From b7f0130d7a4eb7cca55edf5ab9d98f48ba88dcac Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期五, 09 一月 2026 19:28:48 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
---
Main/System/BeautyMM/BeautyMMCell.cs | 2
Main/System/Gubao/GubaoListWin.cs | 12 ++++++
Main/System/BeautyMM/BeautyMMTalentWin.cs | 2
Main/System/Gubao/GubaoCallCell.cs | 21 +++++++++-
Main/System/BattlePass/BattlePassManager.Common.cs | 2
Main/System/Gubao/GubaoCallWin.cs | 65 +++++++++++++-------------------
6 files changed, 60 insertions(+), 44 deletions(-)
diff --git a/Main/System/BattlePass/BattlePassManager.Common.cs b/Main/System/BattlePass/BattlePassManager.Common.cs
index abe8c99..38f7e0b 100644
--- a/Main/System/BattlePass/BattlePassManager.Common.cs
+++ b/Main/System/BattlePass/BattlePassManager.Common.cs
@@ -59,7 +59,7 @@
}
case BattlePassType.GuBao:
{
- totalValue = (int)battlePassData.value1;
+ totalValue = GubaoManager.Instance.GetGubaoTotalCnt();
break;
}
case BattlePassType.Arena:
diff --git a/Main/System/BeautyMM/BeautyMMCell.cs b/Main/System/BeautyMM/BeautyMMCell.cs
index 4e1d5dd..aaa3bd1 100644
--- a/Main/System/BeautyMM/BeautyMMCell.cs
+++ b/Main/System/BeautyMM/BeautyMMCell.cs
@@ -95,7 +95,7 @@
if (mmData != null)
{
lvText.text = mmData.LV.ToString();
- lvBg.SetActive(mmData.LV > 0);
+ lvBg.SetActive(true);
}
else
{
diff --git a/Main/System/BeautyMM/BeautyMMTalentWin.cs b/Main/System/BeautyMM/BeautyMMTalentWin.cs
index 59ba854..93b37a3 100644
--- a/Main/System/BeautyMM/BeautyMMTalentWin.cs
+++ b/Main/System/BeautyMM/BeautyMMTalentWin.cs
@@ -53,7 +53,7 @@
var maxLV = BeautyQualityLVConfig.GetBeautyQualityMaxLV(mmConfig.BeautyQuality);
attrScroller.Refresh();
talentScroller.Refresh();
- for (int i = 0; i < maxLV; i++)
+ for (int i = 0; i <= maxLV; i++)
{
if (i % 20 == 0)
{
diff --git a/Main/System/Gubao/GubaoCallCell.cs b/Main/System/Gubao/GubaoCallCell.cs
index 41c4ccd..2419170 100644
--- a/Main/System/Gubao/GubaoCallCell.cs
+++ b/Main/System/Gubao/GubaoCallCell.cs
@@ -40,6 +40,7 @@
canImage.SetActive(false);
rotationTween.Stop();
openEffect.Stop();
+ showEffect.effectId = GetShowEffectID(result.itemId, result.count);
showEffect.PlayByArrIndex(Math.Max(itemCfg.ItemColor - 1, 0));
itemIcon.SetActive(true);
itemName.SetActive(true);
@@ -50,7 +51,7 @@
itemName.text = itemCfg.ItemName;
itemName.color = UIHelper.GetFuncQualityColor(itemCfg.ItemColor);
cntText.text = "x" + result.count.ToString();
-
+
if (gbCfg == null)
{
pieceImg.SetActive(false);
@@ -63,7 +64,7 @@
{
newImg.SetActive(false);
}
- else if (VirtualPackManager.Instance.GetNoPackItemCount(result.itemId) < gbCfg.UnlockItemCnt)
+ else if (result.count >= gbCfg.UnlockItemCnt && VirtualPackManager.Instance.GetNoPackItemCount(result.itemId) < gbCfg.UnlockItemCnt * 2)
{
newImg.SetActive(true);
}
@@ -103,6 +104,7 @@
await UniTask.Delay(200);
canImage.SetActive(false);
await UniTask.Delay(400);
+ showEffect.effectId = GetShowEffectID(result.itemId, result.count);
showEffect.PlayByArrIndex(Math.Max(itemCfg.ItemColor - 1, 0));
itemIcon.SetActive(true);
itemName.SetActive(true);
@@ -124,7 +126,7 @@
{
newImg.SetActive(false);
}
- else if (VirtualPackManager.Instance.GetNoPackItemCount(result.itemId) < gbCfg.UnlockItemCnt)
+ else if (result.count >= gbCfg.UnlockItemCnt && VirtualPackManager.Instance.GetNoPackItemCount(result.itemId) < gbCfg.UnlockItemCnt * 2)
{
newImg.SetActive(true);
}
@@ -137,4 +139,17 @@
}
+ int GetShowEffectID(int itemID, int cnt)
+ {
+ var config = GubaoConfig.Get(itemID);
+ if (config == null)
+ {
+ return 1095;
+ }
+ if (cnt >= config.UnlockItemCnt)
+ {
+ return 1094;
+ }
+ return 1095;
+ }
}
diff --git a/Main/System/Gubao/GubaoCallWin.cs b/Main/System/Gubao/GubaoCallWin.cs
index 879dd44..d7f9bdb 100644
--- a/Main/System/Gubao/GubaoCallWin.cs
+++ b/Main/System/Gubao/GubaoCallWin.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using System.Runtime.InteropServices;
using Cysharp.Threading.Tasks;
using UnityEngine;
using UnityEngine.UI;
@@ -64,7 +63,7 @@
}
opObj.SetActive(true);
resultObj.SetActive(false);
- ShowVenderTalk(0);
+ ShowVenderTalk(0).Forget();
});
}
@@ -73,12 +72,11 @@
{
HappyXBModel.Instance.RefreshXBTypeInfoAct += Display;
HappyXBModel.Instance.RefreshXBResultAct += ShowResult;
- // GubaoManager.Instance.clickCallEvent += clickCallEvent;
skipToggle.isOn = LocalSave.GetBool(GubaoManager.skipKey + PlayerDatas.Instance.baseData.PlayerID, false);
opObj.SetActive(true);
resultObj.SetActive(false);
- ShowVenderTalk(0);
+ ShowVenderTalk(0).Forget();
Display();
}
@@ -86,35 +84,40 @@
{
HappyXBModel.Instance.RefreshXBTypeInfoAct -= Display;
HappyXBModel.Instance.RefreshXBResultAct -= ShowResult;
- // GubaoManager.Instance.clickCallEvent -= clickCallEvent;
}
//浼樺厛鍙ゅ疂琛ㄧ幇
- void ShowVenderTalk(int quality)
+ async UniTask ShowVenderTalk(int quality, float delay=0)
{
if (quality == 0)
{
var random = Random.Range(1, GubaoManager.Instance.maxIdleTalk + 1);
talkText.text = Language.Get("GubaoIdleTalk" + random);
roleModel.Play(0);
+ return;
+ }
+
+
+ await UniTask.Delay((int)(delay*1000*0.6));
+
+ if (quality >= 10)
+ {
+ //鐗╁搧鍝佽川
+ quality = quality / 10;
+ talkText.text = Language.Get("GubaoResultTalkItem" + quality);
+ roleModel.Play(GubaoManager.Instance.emojiItemDict[quality]);
}
else
{
- if (quality >= 10)
- {
- //鐗╁搧鍝佽川
- quality = quality / 10;
- talkText.text = Language.Get( "GubaoResultTalkItem" + quality);
- roleModel.Play(GubaoManager.Instance.emojiItemDict[quality]);
- }
- else
- {
- talkText.text = Language.Get( "GubaoResultTalkGB" + quality);
- roleModel.Play(GubaoManager.Instance.emojiGBDict[quality]);
- }
+ talkText.text = Language.Get("GubaoResultTalkGB" + quality);
+ roleModel.Play(GubaoManager.Instance.emojiGBDict[quality]);
}
-
+ await UniTask.Delay((int)(delay*1000*0.4));
+ if (delay != 0)
+ {
+ opObj.SetActive(true);
+ }
}
public void Display()
@@ -159,17 +162,10 @@
{
//姣忕瑙﹀彂涓�娆�
cdTime += Time.deltaTime;
- if (cdTime < 0.5) return;
+ if (cdTime < 1) return;
cdTime = 0;
RefreshFreeTime();
- if (resultObj.gameObject.activeSelf && !opObj.gameObject.activeSelf)
- {
- if (Time.time - showResultTime > showCD)
- {
- opObj.SetActive(true);
- ShowVenderTalk(GetResultQuality());
- }
- }
+
}
//鍖哄垎鐗╁搧鍝佽川*10 鍜� 鍙ゅ疂鍝佽川
@@ -269,23 +265,16 @@
if (isSkip)
{
- ShowVenderTalk(GetResultQuality());
+ ShowVenderTalk(GetResultQuality()).Forget();
}
else
{
opObj.SetActive(false);
- ShowVenderTalk(0);
+ ShowVenderTalk(0).Forget();
+ ShowVenderTalk(GetResultQuality(), showCD).Forget();
}
}
- // void clickCallEvent()
- // {
- // if (!skipToggle.isOn)
- // {
- // showResultTime = Time.time + 2; //棰勮寤惰繜2绉掔瓑鏈嶅姟绔�
- // opObj.SetActive(false);
- // }
- // }
void ShowRate()
{
diff --git a/Main/System/Gubao/GubaoListWin.cs b/Main/System/Gubao/GubaoListWin.cs
index 959a197..6239ea3 100644
--- a/Main/System/Gubao/GubaoListWin.cs
+++ b/Main/System/Gubao/GubaoListWin.cs
@@ -14,6 +14,7 @@
[SerializeField] GroupButtonEx starBtn;
[SerializeField] Button seeAttrBtn;
[SerializeField] ScrollerController scroller;
+ [SerializeField] Transform emptyRect;
protected override void InitComponent()
{
@@ -69,6 +70,17 @@
void Display()
{
+ if (GubaoManager.Instance.gubaoCollectDict.IsNullOrEmpty())
+ {
+ emptyRect.SetActive(true);
+ scroller.SetActive(false);
+ return;
+ }
+
+ emptyRect.SetActive(false);
+ scroller.SetActive(true);
+
+
scroller.Refresh();
var keys = GubaoManager.Instance.gubaoCollectDict.Keys.ToList();
keys.OrderByDescending(x => x);
--
Gitblit v1.8.0