using UnityEngine; using UnityEngine.UI; using System.Collections; using Games.Fellow; using GCGame.Table; public class ChatPetSlot : UIItemBase { public Image _Icon; public Text _Name; public Text _LevelDesc; public override void Show(Hashtable hash) { base.Show(); var petInfo = (Fellow)hash["InitObj"]; UpdatePet(petInfo); } public void UpdatePet(Fellow pet) { Tab_FellowBase fellowBase = TableManager.GetFellowBaseByID(pet.DataId, 0); LoadAssetBundle.Instance.SetImageSprite(_Icon, fellowBase.Icon); _Name.text = pet.Name; _LevelDesc.text = StrDictionary.GetClientDictionaryString("#{1242}", pet.Level); } }