完善AR宠物信息脚本2025/4/2

This commit is contained in:
YL 2025-04-02 13:51:59 +08:00
parent d12cd08cf4
commit 47c6f649e5
3 changed files with 6 additions and 6 deletions

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 198c90fca9446c7448c08f2c20a11d9c

View File

@ -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<UIPetinfoWidget>(m_goParent.transform, "UIPetinfoWidget");
}
// 显示tip面板

View File

@ -34,9 +34,9 @@ namespace GameLogic
/// </summary>
/// <param name="image">宠物头像</param>
/// <param name="PetName">宠物名</param>
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;
}
}