Example #1
0
        private void OnTwoHandSlotHover(DragHoverEventArgs p_eventArgs)
        {
            EquipmentItemContainer equipmentItemContainer = Parent as EquipmentItemContainer;

            if (equipmentItemContainer != null)
            {
                equipmentItemContainer.UpdateTwoHandedHighlight(this, p_eventArgs);
            }
        }
Example #2
0
 public override void OnDragHover(DragHoverEventArgs p_eventArgs)
 {
     if (IsTwoHandSlot() && DragDropManager.Instance.DraggedItem is ItemDragObject)
     {
         Equipment equipment = ((ItemDragObject)DragDropManager.Instance.DraggedItem).Item as Equipment;
         if (equipment != null && equipment.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND)
         {
             OnTwoHandSlotHover(p_eventArgs);
         }
     }
     base.OnDragHover(p_eventArgs);
 }
        public void UpdateTwoHandedHighlight(EquipmentSlot p_hoveredSlot, DragHoverEventArgs p_eventArgs)
        {
            EEquipSlots eequipSlots = EEquipSlots.MAIN_HAND;

            if (p_hoveredSlot.Index == 0)
            {
                eequipSlots = EEquipSlots.OFF_HAND;
            }
            EquipmentSlot equipmentSlot = (EquipmentSlot)m_itemSlots[(Int32)eequipSlots];

            equipmentSlot.ForceDragHover(p_eventArgs);
        }
Example #4
0
        private void OnDragHover(DragHoverEventArgs p_eventArgs)
        {
            BaseDragObject draggedItem = DragDropManager.Instance.DraggedItem;
            Boolean        flag        = draggedItem is ItemDragObject || draggedItem is ShopDragObject || draggedItem is LootDragObject;

            m_tab.OnHover(p_eventArgs.IsHovered);
            if (p_eventArgs.IsHovered && flag)
            {
                m_isHovered   = true;
                m_hoveredTime = Time.time;
            }
            else
            {
                m_isHovered = false;
            }
        }
Example #5
0
 public override void OnDragHover(DragHoverEventArgs p_eventArgs)
 {
     if (DragDropManager.Instance.DraggedItem != null && DragDropManager.Instance.DraggedItem is ItemDragObject)
     {
         BaseItem item = ((ItemDragObject)DragDropManager.Instance.DraggedItem).Item;
         if (item != null)
         {
             NGUITools.SetActive(m_hoverTexture.gameObject, p_eventArgs.IsHovered);
             if (p_eventArgs.IsHovered)
             {
                 DragDropManager.Instance.SetHoveredSlot(this);
                 TweenColor.Begin(m_tweenTarget, m_hoverDuration, m_hoverColor);
             }
             else
             {
                 DragDropManager.Instance.SetHoveredSlot(null);
                 TweenColor.Begin(m_tweenTarget, m_hoverDuration, m_originColor);
             }
         }
     }
 }
Example #6
0
 public void ForceDragHover(DragHoverEventArgs p_eventArgs)
 {
     base.OnDragHover(p_eventArgs);
 }