Exemple #1
0
 public virtual void SelectItemSlot(ItemSlotTrading p_slot)
 {
     if (m_selectedItem != null)
     {
         m_selectedItem.SetSelected(false);
     }
     if (p_slot != null)
     {
         p_slot.SetSelected(true);
         m_selectedItem = p_slot;
         Boolean flag = CanBuyConditionsMet(p_slot.Item.Price, LegacyLogic.Instance.WorldManager.Party.Gold);
         if (m_buyButton != null)
         {
             m_buyButton.isEnabled = flag;
             m_buyButtonText.color = ((!flag) ? Color.gray : Color.white);
         }
     }
     else
     {
         m_selectedItem = null;
         if (m_buyButton != null)
         {
             m_buyButton.isEnabled = false;
             m_buyButtonText.color = Color.gray;
         }
     }
 }
Exemple #2
0
 public virtual void ItemRightClick(ItemSlotTrading p_slot)
 {
     SelectItemSlot(p_slot);
     if (m_tradingScreen != null)
     {
         m_tradingScreen.OnBuyButtonClicked();
     }
 }
Exemple #3
0
        public virtual void AddItemSlot()
        {
            GameObject      gameObject = NGUITools.AddChild(this.gameObject, m_itemSlotPrefab);
            ItemSlotTrading component  = gameObject.GetComponent <ItemSlotTrading>();

            m_itemSlots.Add(component);
            component.Index  = m_itemSlots.Count - 1;
            component.Parent = this;
        }
Exemple #4
0
 public ShopDragObject(ItemSlotTrading p_slot)
 {
     m_itemSlot = p_slot;
     m_item     = p_slot.Item;
 }