45 lines
1.2 KiB
C#
45 lines
1.2 KiB
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using System.Collections;
|
|
using Games.Item;
|
|
using GCGame.Table;
|
|
using GCGame;
|
|
|
|
public class MeridiaAttrItem : UIItemBase
|
|
{
|
|
public Text AttrName;
|
|
public Text AttrAdd;
|
|
public GameObject UpImage;
|
|
public Text Updata;
|
|
|
|
MeridiaSoul.BloodVeinAttrData m_data;
|
|
|
|
public override void Show(Hashtable hash)
|
|
{
|
|
m_data = hash["InitObj"] as MeridiaSoul.BloodVeinAttrData;
|
|
if (m_data == null)
|
|
return;
|
|
AttrName.text = PropID.GetAttrName((PropID.PropertyID)m_data.ProId);
|
|
AttrAdd.text = m_data.ProVal.ToString();
|
|
base.Show();
|
|
}
|
|
|
|
public override void Refresh()
|
|
{
|
|
base.Refresh();
|
|
UpImage.SetActive(false);
|
|
Updata.gameObject.SetActive(false);
|
|
}
|
|
|
|
public override void Refresh(Hashtable hash)
|
|
{
|
|
base.Refresh(hash);
|
|
MeridiaSoul.BloodVeinAttrData add = hash["InitObj"] as MeridiaSoul.BloodVeinAttrData;
|
|
if(add!=null && add.ProId==m_data.ProId && add.ProVal>0)
|
|
{
|
|
UpImage.SetActive(true);
|
|
Updata.gameObject.SetActive(true);
|
|
Updata.text = add.ProVal.ToString();
|
|
}
|
|
}
|
|
} |