示例#1
0
        public void ShowItem()
        {
            m_iSelectingItemSerial.Value = 0;

            RPGKitUtil.DeleteObjects <EquipBanner>(m_tfRootBanner.gameObject);
            RPGKitUtil.DeleteObjects <BannerItem>(m_tfRootBanner.gameObject);
            m_itemBannerList.Clear();

            foreach (DataItemParam data in DataManager.Instance.m_dataItem.list)
            {
                GameObject objItem = Instantiate(m_prefBannerItem, m_tfRootBanner) as GameObject;
                objItem.SetActive(true);
                BannerItem banner = objItem.GetComponent <BannerItem>();
                banner.Initialize(data);
                m_itemBannerList.Add(banner);

                banner.OnBannerDataItem.AddListener((value) =>
                {
                    m_iSelectingItemSerial.Value = value.item_serial;
                    UIAssistant.Instance.ShowPage("FieldMenuItemCheck");
                });
            }
        }