From ae765e2a8ad287b5341aaeb92858adec51ff746f Mon Sep 17 00:00:00 2001 From: "DESKTOP-SAJ6RKV\\Administrator" Date: Fri, 13 Jun 2025 03:20:54 +0800 Subject: [PATCH] 1 --- .../AssetRaw/Effects/NewLiwu/JSZ.prefab | 2 +- .../GameLogic/Manager/DataGameSceneManager.cs | 51 ++++++++++++++----- .../GameLogic/UI/UIGameWorldRankItem.cs | 5 +- 3 files changed, 40 insertions(+), 18 deletions(-) diff --git a/UnityProject/Assets/AssetRaw/Effects/NewLiwu/JSZ.prefab b/UnityProject/Assets/AssetRaw/Effects/NewLiwu/JSZ.prefab index db0a02d9..b8bd6d14 100644 --- a/UnityProject/Assets/AssetRaw/Effects/NewLiwu/JSZ.prefab +++ b/UnityProject/Assets/AssetRaw/Effects/NewLiwu/JSZ.prefab @@ -17,7 +17,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!4 &5753486765300740275 Transform: m_ObjectHideFlags: 0 diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs index d05eefc8..87ae901e 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs @@ -856,20 +856,6 @@ namespace GameLogic actor.AddBuff(m_Buff, unitPlayerData, giftConfig); - // 这里只处理前十,排除自己 - //// 给其他赛道天降流星雨 - //foreach (var item in m_DicTeamList) - //{ - // if (item.Value != actor) - // { - // await UniTask.Delay(500); - // // 添加减速Buff - // Buff m_Buff1 = new Buff(); - // m_Buff1.OnInit(giftConfig.Id, giftConfig.AddPower * num, giftConfig.TimerLen, giftConfig.AddGiftScore, num); - // item.Value.AddBuff(m_Buff1, unitPlayerData, giftConfig); - // } - //} - List m_TempList = new List(); foreach (var item in m_DicTeamList) @@ -893,6 +879,40 @@ namespace GameLogic } }); + // 生成手指特效 + if (m_TempList[0] == actor) + { + // 自己是第一名,则给第二名生成一个特效 + + // 添加减速Buff给到 + var eGo = GameModule.Resource.LoadGameObject("JSZ"); + eGo.transform.SetParent(m_TempList[1].GetRect().transform); + eGo.transform.localPosition = new Vector3(0, 0, 0); + eGo.transform.localScale = Vector3.one * 0.5f; + + // 移动特效 + eGo.transform.DOLocalMoveX(-1, 30f).OnComplete(() => + { + GameObject.Destroy(eGo); + }); + } + else + { + // 给第一名生成一个特效 + // 添加减速Buff给到 + var eGo = GameModule.Resource.LoadGameObject("JSZ"); + eGo.transform.SetParent(m_TempList[0].GetRect().transform); + eGo.transform.localPosition = new Vector3(0, 0, 0); + eGo.transform.localScale = Vector3.one * 0.5f; + + // 移动特效 + eGo.transform.DOLocalMoveX(-1, 30f).OnComplete(() => + { + GameObject.Destroy(eGo); + }); + } + + for (int i = 0; i < m_TempList.Count; i++) { //if (m_TempList[i] == actor) @@ -908,6 +928,9 @@ namespace GameLogic } + + + // 告知UI,创建全屏特效 GameEvent.Send(EventConts.TtqEffectCreate, giftConfig); } diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameWorldRankItem.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameWorldRankItem.cs index 1ece996e..7b30497a 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameWorldRankItem.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameWorldRankItem.cs @@ -49,19 +49,18 @@ namespace GameLogic Img.gameObject.SetActive(playRankData.winCount >= 10); - int mLoadId = 0; + int mLoadId = gongxianList.Count; // жԼwincount ǵڼId gongxianList for (int j = 0; j < gongxianList.Count; j++) { - if (gongxianList[j] > playRankData.winCount) + if (playRankData.winCount < gongxianList[j]) { mLoadId = j; break; } } - if (playRankData.winCount >= 10 && mLoadId > 0) { Img.sprite = GameModule.Resource.LoadAsset("qt_" + (mLoadId));