using System.Collections;
|
using System.Collections.Generic;
|
using UnityEngine;
|
using UnityEngine.UI;
|
|
using System;
|
|
namespace Snxxz.UI
|
{
|
public class DogzEquip : MonoBehaviour
|
{
|
[SerializeField] CommonItemBaisc itemBaisc;
|
[SerializeField] Text strengLvTxt;
|
ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
public void Display(ItemModel model)
|
{
|
itemBaisc.Init(model);
|
int strenLv = 0;
|
if(model.GetUseData((int)ItemUseDataKey.dogzEquipPlus) != null)
|
{
|
strenLv = model.GetUseData((int)ItemUseDataKey.dogzEquipPlus)[0];
|
}
|
if (strenLv > 0)
|
{
|
strengLvTxt.gameObject.SetActive(true);
|
strengLvTxt.text = StringUtility.Contact("+", strenLv);
|
}
|
else
|
{
|
strengLvTxt.gameObject.SetActive(false);
|
}
|
itemBaisc.button.RemoveAllListeners();
|
itemBaisc.button.AddListener(()=>
|
{
|
tipsModel.SetItemTipsModel(model.packType,model.guid,false,false);
|
tipsModel.SetDogzEquipBtn(tipsModel.curAttrData);
|
tipsModel.ShowTip();
|
});
|
}
|
}
|
}
|
|