diff --git a/UnityProject/Assets/AssetRaw/UI/UIGameBattle.prefab b/UnityProject/Assets/AssetRaw/UI/UIGameBattle.prefab index 95bff251..f900e807 100644 --- a/UnityProject/Assets/AssetRaw/UI/UIGameBattle.prefab +++ b/UnityProject/Assets/AssetRaw/UI/UIGameBattle.prefab @@ -37314,9 +37314,9 @@ RectTransform: - {fileID: 8086681985000168470} m_Father: {fileID: 903966777167520147} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 667, y: -69.642} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 127, y: 463.358} m_SizeDelta: {x: 1080, y: 109} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &3182275938344351334 diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs index e0cfd290..7aa2ea23 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs @@ -280,7 +280,7 @@ namespace GameLogic // 创建一个玩家头像出来 UIPlayerHeadItem actorHItem = CreateWidgetByPrefab(m_itemHeadItem, m_rectHeadRt, true); - actorHItem.OnInit(unitPlayerData); + actorHItem.OnInit(unitPlayerData,true); actorHItem.transform.SetParent(m_rectCar.transform); actorHItem.transform.localPosition = new Vector3(-1500, 0, 0); @@ -320,11 +320,6 @@ namespace GameLogic UIPlayerAddNumItem actorHItem = CreateWidgetByPrefab (m_itemAddNum, m_rectNao, true); //actorHItem.OnInit(data); - - - await UniTask.Delay(2000); - // 特效播放完毕后销毁 - GameObject.Destroy(actorHItem.gameObject); }); } else if (buff.m_Id == 2) diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameBattle.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameBattle.cs index 8e2a273b..37923dcd 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameBattle.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameBattle.cs @@ -128,7 +128,7 @@ namespace GameLogic // 计算位置 r.anchorMin = new Vector2(0.5f, 0.5f); r.anchorMax = new Vector2(0.5f, 0.5f); - r.anchoredPosition = new Vector2(0, 435 - 65 - i * (109 - 5f)); + r.anchoredPosition = new Vector2(127, 435 - 65 - i * (109 - 5f)); r.localPosition = new Vector3(r.localPosition.x, r.localPosition.y, 0); actorHItem.OnInit(i); DataGameSceneManager.Instance.m_DicTeamList.Add((i + 1).ToString(), actorHItem); @@ -602,7 +602,7 @@ namespace GameLogic var hItemActor = hItemActors[i].actor; //hItemActor.m_Index = i; var rectTransform = hItemActor.gameObject.GetComponent(); - Vector2 targetPosition = new Vector2(0, 435 - i * (109 - 5f)); + Vector2 targetPosition = new Vector2(127, 435 - i * (109 - 5f)); targetPositions[rectTransform] = targetPosition; } diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIPlayerHeadItem.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIPlayerHeadItem.cs index 4de3324c..a49f11aa 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIPlayerHeadItem.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIPlayerHeadItem.cs @@ -5,15 +5,15 @@ using Cysharp.Threading.Tasks; namespace GameLogic { - [Window(UILayer.UI)] - class UIPlayerHeadItem : UIWidget - { - #region űɵĴ - private Image m_imgHeadIcon; - protected override void ScriptGenerator() - { - m_imgHeadIcon = FindChildComponent("Mask/m_imgHeadIcon"); - } + [Window(UILayer.UI)] + class UIPlayerHeadItem : UIWidget + { + #region űɵĴ + private Image m_imgHeadIcon; + protected override void ScriptGenerator() + { + m_imgHeadIcon = FindChildComponent("Mask/m_imgHeadIcon"); + } #endregion #region ¼ @@ -29,12 +29,15 @@ namespace GameLogic } - public void OnInit(UnitPlayerData playerData) + public void OnInit(UnitPlayerData playerData, bool isDestroy = false) { // ͷ AsyncImageDownload.Instance.SetAsyncImage(playerData.protCustMessageData.imgURL, m_imgHeadIcon); - - UniTask.Delay(5000).ContinueWith(() => { Destroy(); }); + + if (isDestroy) + { + UniTask.Delay(5000).ContinueWith(() => { Destroy(); }); + } } } }