Пример #1
0
        public void Init(BaseItem item, Int32 gold)
        {
            m_item = item;
            String icon = null;

            if (m_item is Scroll)
            {
                icon = "ITM_consumable_scroll";
            }
            else if (m_item != null)
            {
                icon = m_item.Icon;
            }
            base.Init((m_item == null) ? null : m_item.Name, icon, gold, (m_item == null) ? Color.green : ItemTooltip.GetItemColor(m_item));
            if (m_item is Scroll)
            {
                NGUITools.SetActiveSelf(m_scrollIcon.gameObject, true);
                m_scrollIcon.spriteName = m_item.Icon;
            }
            else if (m_item != null)
            {
                ItemSlot.UpdateItemBackground(m_itemIconBackground, m_item);
            }
        }