using UnityEngine; using System.Collections; using UnityEngine.UI; using GCGame.Table; using Games.Mission; using System; public class AucationClassItem : MonoBehaviour { public int classType = -1; //分类ID public GameObject markIcon; public Text descText; //描述 public Text hl_DescText; // 高亮描述 public void InitItem(int classId, string itemName) { classType = classId; descText.text = itemName; if(hl_DescText != null) { hl_DescText.text = descText.text; } } //传递当前的下标 初始化需要显示的Item public void OnItemClick() { AucationingPanelCtr.Instance.ShowClassPage(classType); } public void InitMenuItemState(bool isOn) { if(isOn) { if(!markIcon.gameObject.activeInHierarchy) { markIcon.gameObject.SetActive(true); } //请求当前的页面信息 CG_SNATCH_REQ_CUR_PAGE_ITEM req = (CG_SNATCH_REQ_CUR_PAGE_ITEM)PacketDistributed.CreatePacket(MessageID.PACKET_CG_SNATCH_REQ_CUR_PAGE_ITEM); req.SetType(classType); req.SendPacket(); } else { if(markIcon.gameObject.activeInHierarchy) { markIcon.gameObject.SetActive(false); } } } }