完善AR宠物信息脚本2025/4/2
This commit is contained in:
parent
d12cd08cf4
commit
47c6f649e5
2
EintooAR/Assets/AssetArt/Toon Fantasy Nature 1.meta
Normal file
2
EintooAR/Assets/AssetArt/Toon Fantasy Nature 1.meta
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 198c90fca9446c7448c08f2c20a11d9c
|
@ -8,6 +8,7 @@ namespace GameLogic
|
|||||||
[Window(UILayer.UI)]
|
[Window(UILayer.UI)]
|
||||||
class UIPetInfoWindow : UIWindow
|
class UIPetInfoWindow : UIWindow
|
||||||
{
|
{
|
||||||
|
private UIPetinfoWidget m_PetinfoWidget;
|
||||||
#region 脚本工具生成的代码
|
#region 脚本工具生成的代码
|
||||||
private Button m_btnAddtionPet;
|
private Button m_btnAddtionPet;
|
||||||
private GameObject m_goParent;
|
private GameObject m_goParent;
|
||||||
@ -47,10 +48,7 @@ namespace GameLogic
|
|||||||
// 创建宠物信息
|
// 创建宠物信息
|
||||||
private void CreatePetInfoPrefab()
|
private void CreatePetInfoPrefab()
|
||||||
{
|
{
|
||||||
GameObject PetInfoPrefab = GameModule.Resource.LoadGameObject("UIPetinfoWidget");
|
m_PetinfoWidget = CreateWidgetByPath<UIPetinfoWidget>(m_goParent.transform, "UIPetinfoWidget");
|
||||||
PetInfoPrefab.transform.SetParent(m_goParent.transform);
|
|
||||||
PetInfoPrefab.transform.localPosition = Vector3.zero;
|
|
||||||
PetInfoPrefab.transform.localScale = Vector3.one;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 显示tip面板
|
// 显示tip面板
|
||||||
|
@ -34,9 +34,9 @@ namespace GameLogic
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="image">宠物头像</param>
|
/// <param name="image">宠物头像</param>
|
||||||
/// <param name="PetName">宠物名</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;
|
this.m_tmptextPetName.text = PetName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user