From e6de85d765162dd1c2aeedf2d2099c382dd61f62 Mon Sep 17 00:00:00 2001 From: "DESKTOP-SAJ6RKV\\Administrator" Date: Tue, 17 Jun 2025 19:47:14 +0800 Subject: [PATCH] 1 --- .../Atlas/UIRaw_Atlas_新增内容.spriteatlas | 21 +--- UnityProject/Assets/AssetRaw/UI/HDWMSP.prefab | 19 +++- .../Assets/AssetRaw/UI/UIGameBattle.prefab | 107 ++++++++++++++++++ .../HotFix/GameLogic/Common/EventConts.cs | 1 + .../GameLogic/Manager/DataGameSceneManager.cs | 3 + .../HotFix/GameLogic/UI/UIGameBattle.cs | 14 ++- .../HotFix/GameLogic/UI/UIHDWmsp.cs | 25 ++++ .../HotFix/GameLogic/UI/UIHDWmsp.cs.meta | 11 ++ 8 files changed, 179 insertions(+), 22 deletions(-) create mode 100644 UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIHDWmsp.cs create mode 100644 UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIHDWmsp.cs.meta diff --git a/UnityProject/Assets/AssetArt/Atlas/UIRaw_Atlas_新增内容.spriteatlas b/UnityProject/Assets/AssetArt/Atlas/UIRaw_Atlas_新增内容.spriteatlas index 634b55e1..8670a5a8 100644 --- a/UnityProject/Assets/AssetArt/Atlas/UIRaw_Atlas_新增内容.spriteatlas +++ b/UnityProject/Assets/AssetArt/Atlas/UIRaw_Atlas_新增内容.spriteatlas @@ -71,32 +71,17 @@ SpriteAtlas: secondaryTextureSettings: {} variantMultiplier: 1 packables: -<<<<<<< Updated upstream -======= - {fileID: 21300000, guid: 2b6f8d50ab114d448b03e8b7c279f230, type: 3} - {fileID: 21300000, guid: 771e7d7731b51d74f99f46460198d153, type: 3} - - {fileID: 21300000, guid: ec9ae6c212a5c7447a91eb6bf4788311, type: 3} ->>>>>>> Stashed changes - {fileID: 21300000, guid: 86ab5d2474d50d448a735fb340c904b4, type: 3} - - {fileID: 21300000, guid: 38a120ecc4a4c964fa5d4e7b77e63619, type: 3} - {fileID: 21300000, guid: e0246e23c99b19945b74857ab2afc817, type: 3} - - {fileID: 21300000, guid: 0a4f5c692f81d4d4f955f18051647cb9, type: 3} bindAsDefault: 1 isAtlasV2: 0 cachedData: {fileID: 0} - packedSpriteRenderDataKeys: - - 86ab5d2474d50d448a735fb340c904b4: 21300000 - - 0a4f5c692f81d4d4f955f18051647cb9: 21300000 - - 38a120ecc4a4c964fa5d4e7b77e63619: 21300000 + packedSpriteRenderDataKeys: [] m_MasterAtlas: {fileID: 0} - m_PackedSprites: - - {fileID: 21300000, guid: 86ab5d2474d50d448a735fb340c904b4, type: 3} - - {fileID: 21300000, guid: 0a4f5c692f81d4d4f955f18051647cb9, type: 3} - - {fileID: 21300000, guid: 38a120ecc4a4c964fa5d4e7b77e63619, type: 3} - m_PackedSpriteNamesToIndex: - - zjm_tc_wmsp - - "\u53C2\u8003\u56FE" - - zjm_wxwmjsq + m_PackedSprites: [] + m_PackedSpriteNamesToIndex: [] m_RenderDataMap: {} m_Tag: "UIRaw_Atlas_\u65B0\u589E\u5185\u5BB9" m_IsVariant: 0 diff --git a/UnityProject/Assets/AssetRaw/UI/HDWMSP.prefab b/UnityProject/Assets/AssetRaw/UI/HDWMSP.prefab index c9a4263a..8ae2456f 100644 --- a/UnityProject/Assets/AssetRaw/UI/HDWMSP.prefab +++ b/UnityProject/Assets/AssetRaw/UI/HDWMSP.prefab @@ -4844,7 +4844,7 @@ GameObject: - component: {fileID: 9006140915265678874} - component: {fileID: 3083103117851827895} m_Layer: 5 - m_Name: WenMing + m_Name: m_tmp_TeamName m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -4906,7 +4906,7 @@ MonoBehaviour: m_fontMaterials: [] m_fontColor32: serializedVersion: 2 - rgba: 6939388 + rgba: 4285129468 m_fontColor: {r: 0.98823535, g: 0.8862746, b: 0.41176474, a: 1} m_enableVertexGradient: 0 m_colorMode: 3 @@ -9928,6 +9928,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 8451575949868884774} + - component: {fileID: 7538243395150443130} m_Layer: 5 m_Name: HDWMSP m_TagString: Untagged @@ -9956,6 +9957,18 @@ RectTransform: m_AnchoredPosition: {x: 348.3, y: 268.9} m_SizeDelta: {x: 100, y: 100} m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &7538243395150443130 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1670347114808273646} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a6e89f00f25b10c4da1a404c4c5f2955, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &1717311148866719178 GameObject: m_ObjectHideFlags: 0 @@ -10309,7 +10322,7 @@ MonoBehaviour: m_fontMaterials: [] m_fontColor32: serializedVersion: 2 - rgba: 16777215 + rgba: 4294967295 m_fontColor: {r: 1, g: 1, b: 1, a: 1} m_enableVertexGradient: 0 m_colorMode: 3 diff --git a/UnityProject/Assets/AssetRaw/UI/UIGameBattle.prefab b/UnityProject/Assets/AssetRaw/UI/UIGameBattle.prefab index e5401436..b4d3c96e 100644 --- a/UnityProject/Assets/AssetRaw/UI/UIGameBattle.prefab +++ b/UnityProject/Assets/AssetRaw/UI/UIGameBattle.prefab @@ -58066,6 +58066,7 @@ RectTransform: m_Children: - {fileID: 4655219308374456140} - {fileID: 3086937246495487097} + - {fileID: 3735584724623260786} m_Father: {fileID: 1508900408836313865} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} @@ -99260,6 +99261,112 @@ Transform: m_CorrespondingSourceObject: {fileID: 4584437216545881317, guid: 22072e4e48fdd8d44a6541e32e8b6415, type: 3} m_PrefabInstance: {fileID: 3113856628817430133} m_PrefabAsset: {fileID: 0} +--- !u!1001 &5088347465780830036 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 6805953989209425366} + m_Modifications: + - target: {fileID: 1670347114808273646, guid: f6282c9fd1b60fa44a49784333a9ad3b, type: 3} + propertyPath: m_Name + value: HDWMSP + objectReference: {fileID: 0} + - target: {fileID: 1670347114808273646, guid: f6282c9fd1b60fa44a49784333a9ad3b, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8451575949868884774, guid: f6282c9fd1b60fa44a49784333a9ad3b, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 8451575949868884774, guid: f6282c9fd1b60fa44a49784333a9ad3b, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 8451575949868884774, guid: f6282c9fd1b60fa44a49784333a9ad3b, type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 8451575949868884774, guid: f6282c9fd1b60fa44a49784333a9ad3b, type: 3} + propertyPath: m_AnchorMax.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 8451575949868884774, guid: f6282c9fd1b60fa44a49784333a9ad3b, type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 8451575949868884774, guid: f6282c9fd1b60fa44a49784333a9ad3b, type: 3} + propertyPath: m_AnchorMin.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 8451575949868884774, guid: f6282c9fd1b60fa44a49784333a9ad3b, type: 3} + propertyPath: m_SizeDelta.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 8451575949868884774, guid: f6282c9fd1b60fa44a49784333a9ad3b, type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 8451575949868884774, guid: f6282c9fd1b60fa44a49784333a9ad3b, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8451575949868884774, guid: f6282c9fd1b60fa44a49784333a9ad3b, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8451575949868884774, guid: f6282c9fd1b60fa44a49784333a9ad3b, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8451575949868884774, guid: f6282c9fd1b60fa44a49784333a9ad3b, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8451575949868884774, guid: f6282c9fd1b60fa44a49784333a9ad3b, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8451575949868884774, guid: f6282c9fd1b60fa44a49784333a9ad3b, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8451575949868884774, guid: f6282c9fd1b60fa44a49784333a9ad3b, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8451575949868884774, guid: f6282c9fd1b60fa44a49784333a9ad3b, type: 3} + propertyPath: m_AnchoredPosition.x + value: 348.3 + objectReference: {fileID: 0} + - target: {fileID: 8451575949868884774, guid: f6282c9fd1b60fa44a49784333a9ad3b, type: 3} + propertyPath: m_AnchoredPosition.y + value: 268.9 + objectReference: {fileID: 0} + - target: {fileID: 8451575949868884774, guid: f6282c9fd1b60fa44a49784333a9ad3b, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8451575949868884774, guid: f6282c9fd1b60fa44a49784333a9ad3b, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8451575949868884774, guid: f6282c9fd1b60fa44a49784333a9ad3b, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: f6282c9fd1b60fa44a49784333a9ad3b, type: 3} +--- !u!224 &3735584724623260786 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 8451575949868884774, guid: f6282c9fd1b60fa44a49784333a9ad3b, type: 3} + m_PrefabInstance: {fileID: 5088347465780830036} + m_PrefabAsset: {fileID: 0} --- !u!1001 &5822606616100293313 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/EventConts.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/EventConts.cs index 556b14b6..3e004aae 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/EventConts.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/EventConts.cs @@ -77,6 +77,7 @@ namespace GameLogic public const string HuangJinGameEnd = "HuangJinGameEnd"; public const string GuanJunShiKe = "GuanJunShiKe"; public const string UIDianZan = "UIDianZan"; + public const string UIHDWMSP = "UIHDWMSP"; #endregion diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs index d1bf233d..907f10e1 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs @@ -740,6 +740,9 @@ namespace GameLogic eGo.transform.localPosition = new Vector3(-1500, 0, 0); eGo.transform.localScale = Vector3.one; + string str = DataGameSceneManager.Instance.GetStrs(int.Parse(unitPlayerData.teamId) - 1); + GameEvent.Send(EventConts.UIHDWMSP, unitPlayerData, str + "氏文明"); + // 移动特效 eGo.transform.DOLocalMoveX(0, 5f).OnComplete(async () => { diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameBattle.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameBattle.cs index 556c18a0..8d622409 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameBattle.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameBattle.cs @@ -9,6 +9,7 @@ using TMPro; using Coffee.UIExtensions; using UnityEngine.Video; using System.Xml.Linq; +using System; namespace GameLogic { @@ -314,6 +315,7 @@ namespace GameLogic GameEvent.AddEventListener(EventConts.HuangJinGameEnd, HuangJinGameEndFunc); GameEvent.AddEventListener(EventConts.GuanJunShiKe, GuanJunShiKeFunc); GameEvent.AddEventListener(EventConts.UIDianZan, UIDianZanFunc); + GameEvent.AddEventListener(EventConts.UIHDWMSP, AddHdWmspFunc); GameEvent.AddEventListener(EventConts.AddGiftMessage, AddGiftMessageFunc); } @@ -328,6 +330,7 @@ namespace GameLogic GameEvent.RemoveEventListener(EventConts.HuangJinGameEnd, HuangJinGameEndFunc); GameEvent.RemoveEventListener(EventConts.GuanJunShiKe, GuanJunShiKeFunc); GameEvent.RemoveEventListener(EventConts.UIDianZan, UIDianZanFunc); + GameEvent.RemoveEventListener(EventConts.UIHDWMSP, AddHdWmspFunc); GameEvent.RemoveEventListener(EventConts.AddGiftMessage, AddGiftMessageFunc); } @@ -463,7 +466,7 @@ namespace GameLogic DataGameSceneManager.Instance.m_LiShiShiJianLikeCount = 0; m_video_SjVideo.targetTexture.DiscardContents(); - + } @@ -628,6 +631,15 @@ namespace GameLogic giftItem.GetComponent().OnInit(unitPlayerData, giftConfig, num); } + private void AddHdWmspFunc(UnitPlayerData unitPlayerData, string teamName) + { + var giftItem = GameObject.Instantiate(m_rect_GiftPanel.transform.GetChild(2)); + giftItem.transform.SetParent(m_rect_GiftPanel); + giftItem.transform.localScale = Vector3.one; + giftItem.transform.localPosition = Vector3.zero; + giftItem.gameObject.SetActive(true); + giftItem.GetComponent().OnInit(teamName, unitPlayerData.protCustMessageData.nickName, unitPlayerData.protCustMessageData.imgURL); + } /// /// 收到游戏重开的消息 diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIHDWmsp.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIHDWmsp.cs new file mode 100644 index 00000000..1cbc5e70 --- /dev/null +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIHDWmsp.cs @@ -0,0 +1,25 @@ +using System.Collections; +using System.Collections.Generic; +using TMPro; +using UnityEngine; +using UnityEngine.UI; + +namespace GameLogic +{ + public class UIHDWmsp : MonoBehaviour + { + + public TextMeshProUGUI m_teamName; + public TextMeshProUGUI m_PlayerName; + public RawImage m_HeadIcon; + + + public void OnInit(string teamName, string playerName, string imgUrl) + { + m_teamName.text = teamName; + m_PlayerName.text = playerName; + AsyncImageDownload.Instance.SetAsyncImage(imgUrl, m_HeadIcon); + } + + } +} diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIHDWmsp.cs.meta b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIHDWmsp.cs.meta new file mode 100644 index 00000000..81dd165e --- /dev/null +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIHDWmsp.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a6e89f00f25b10c4da1a404c4c5f2955 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: