33 lines
759 B
C#
33 lines
759 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using System.Collections;
|
|
using Games.Item;
|
|
|
|
public class PetGrowAttr : UIItemBase
|
|
{
|
|
public Text AttrName;
|
|
public Text AttrValue;
|
|
public Text AttrAdd;
|
|
public GameObject UpImage;
|
|
public override void Show(Hashtable hash)
|
|
{
|
|
string valueStr = (string)hash["InitObj"];
|
|
string[] datas = valueStr.Split('-');
|
|
if (datas.Length < 3)
|
|
return;
|
|
AttrName.text = datas[0];
|
|
AttrValue.text = datas[1];
|
|
if(datas[2] == "0")
|
|
{
|
|
AttrAdd.text = "";
|
|
UpImage.SetActive(false);
|
|
}
|
|
else
|
|
{
|
|
AttrAdd.text = datas[2];
|
|
UpImage.SetActive(true);
|
|
}
|
|
|
|
base.Show();
|
|
}
|
|
} |