From 47c6f649e5f3d0ae932786a45fc68028e0b25741 Mon Sep 17 00:00:00 2001 From: YL Date: Wed, 2 Apr 2025 13:51:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84AR=E5=AE=A0=E7=89=A9=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E8=84=9A=E6=9C=AC2025/4/2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EintooAR/Assets/AssetArt/Toon Fantasy Nature 1.meta | 2 ++ .../GameLogic/YL/UI/UIPetInfoWindow/UIPetInfoWindow.cs | 6 ++---- .../UI/UIPetInfoWindow/UIPetinfoWidget/UIPetinfoWidget.cs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 EintooAR/Assets/AssetArt/Toon Fantasy Nature 1.meta diff --git a/EintooAR/Assets/AssetArt/Toon Fantasy Nature 1.meta b/EintooAR/Assets/AssetArt/Toon Fantasy Nature 1.meta new file mode 100644 index 00000000..e6bebb02 --- /dev/null +++ b/EintooAR/Assets/AssetArt/Toon Fantasy Nature 1.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 198c90fca9446c7448c08f2c20a11d9c \ No newline at end of file diff --git a/EintooAR/Assets/GameScripts/HotFix/GameLogic/YL/UI/UIPetInfoWindow/UIPetInfoWindow.cs b/EintooAR/Assets/GameScripts/HotFix/GameLogic/YL/UI/UIPetInfoWindow/UIPetInfoWindow.cs index bf227926..107f19af 100644 --- a/EintooAR/Assets/GameScripts/HotFix/GameLogic/YL/UI/UIPetInfoWindow/UIPetInfoWindow.cs +++ b/EintooAR/Assets/GameScripts/HotFix/GameLogic/YL/UI/UIPetInfoWindow/UIPetInfoWindow.cs @@ -8,6 +8,7 @@ namespace GameLogic [Window(UILayer.UI)] class UIPetInfoWindow : UIWindow { + private UIPetinfoWidget m_PetinfoWidget; #region 脚本工具生成的代码 private Button m_btnAddtionPet; private GameObject m_goParent; @@ -47,10 +48,7 @@ namespace GameLogic // 创建宠物信息 private void CreatePetInfoPrefab() { - GameObject PetInfoPrefab = GameModule.Resource.LoadGameObject("UIPetinfoWidget"); - PetInfoPrefab.transform.SetParent(m_goParent.transform); - PetInfoPrefab.transform.localPosition = Vector3.zero; - PetInfoPrefab.transform.localScale = Vector3.one; + m_PetinfoWidget = CreateWidgetByPath(m_goParent.transform, "UIPetinfoWidget"); } // 显示tip面板 diff --git a/EintooAR/Assets/GameScripts/HotFix/GameLogic/YL/UI/UIPetInfoWindow/UIPetinfoWidget/UIPetinfoWidget.cs b/EintooAR/Assets/GameScripts/HotFix/GameLogic/YL/UI/UIPetInfoWindow/UIPetinfoWidget/UIPetinfoWidget.cs index 3e48f360..e1eea696 100644 --- a/EintooAR/Assets/GameScripts/HotFix/GameLogic/YL/UI/UIPetInfoWindow/UIPetinfoWidget/UIPetinfoWidget.cs +++ b/EintooAR/Assets/GameScripts/HotFix/GameLogic/YL/UI/UIPetInfoWindow/UIPetinfoWidget/UIPetinfoWidget.cs @@ -34,9 +34,9 @@ namespace GameLogic /// /// 宠物头像 /// 宠物名 - private void SetPetBanData(Image image,string PetName) + public void SetPetBanData(Sprite Sp,string PetName) { - this.m_imgPetImage.sprite = image.sprite; + this.m_imgPetImage.sprite = Sp; this.m_tmptextPetName.text = PetName; } }