From 68c93280a47b8f47a7e789edf6047f0402cee13e Mon Sep 17 00:00:00 2001 From: "SD-20250424WZPW\\Administrator" Date: Thu, 8 May 2025 17:23:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E9=BE=99=E5=8D=B7=E9=A3=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/AssetRaw/UI/UIGameBattle.prefab | 10 +++++----- .../HotFix/GameLogic/Actor/ActorHItem.cs | 5 ++++- .../GameLogic/Manager/DataGameSceneManager.cs | 15 +++++++++------ 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/UnityProject/Assets/AssetRaw/UI/UIGameBattle.prefab b/UnityProject/Assets/AssetRaw/UI/UIGameBattle.prefab index d9510ea0..71a1c806 100644 --- a/UnityProject/Assets/AssetRaw/UI/UIGameBattle.prefab +++ b/UnityProject/Assets/AssetRaw/UI/UIGameBattle.prefab @@ -1041,10 +1041,10 @@ RectTransform: - {fileID: 3547666515304448482} m_Father: {fileID: 7323484200357829197} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 91.5, y: -21.5} + m_SizeDelta: {x: 31, y: 31} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &5164661564043509363 CanvasRenderer: @@ -2248,7 +2248,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &1950349943801813264 RectTransform: m_ObjectHideFlags: 0 diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs index 7794c448..98665fbd 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs @@ -73,7 +73,10 @@ namespace GameLogic } - + public RectTransform GetRect() + { + return m_rectCar; + } public void AddPlayer(UnitPlayerData data) { diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs index b7956969..3b13c787 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs @@ -475,12 +475,15 @@ namespace GameLogic return; } - List m_TempList = new List(); + int count = 3; // 最多给的Buff数量 + // 生成台风 foreach (var item in m_DicTeamList) { - if (item.Value != actor) + if (item.Value != actor && count > 0) { + count--; + // 添加减速Buff Buff m_Buff1 = new Buff(); m_Buff1.OnInit(giftConfig.Id, giftConfig.AddPower * num, giftConfig.TimerLen, giftConfig.AddGiftScore, num); @@ -489,16 +492,16 @@ namespace GameLogic // 添加减速Buff给到 var eGo = GameModule.Resource.LoadGameObject(giftConfig.EffectName); - eGo.transform.SetParent(item.Value.transform); - eGo.transform.localPosition = actor.transform.position; // 设置到目标父节点位置 + eGo.transform.SetParent(item.Value.GetRect().transform); + //eGo.transform.localPosition = actor.GetRect().transform.position; // 设置到目标父节点位置 + eGo.transform.position = actor.GetRect().transform.position; eGo.transform.localScale = Vector3.one; eGo.transform.GetComponent().scale = giftConfig.EffectScale; m_Buff1.m_EffectGo = eGo; // 移动特效 - eGo.transform.DOLocalMove(Vector3.zero, 0.5f); + eGo.transform.DOLocalMove(Vector3.zero, 1.5f); - m_TempList.Add(item.Value); } } }