public void EndDragAction() { RaiseDropEvent(); m_dragStopped = false; m_hoveredSlot = null; if (m_draggedItem != null) { m_draggedItem.SetActive(false); m_draggedItem = null; } }
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; } }
public void StartDrag(BaseDragObject p_dragObject) { m_draggedItem = p_dragObject; m_draggedItem.Sprite = m_sprite; m_draggedItem.ActionSprite = m_actionSprite; m_draggedItem.ItemCounter = m_itemCounter; m_draggedItem.ScrollSprite = m_scrollSprite; m_draggedItem.BrokenSprite = m_brokenSprite; m_draggedItem.ItemBackground = m_itemBackground; m_draggedItem.CharacterHud = m_characterHud; if (m_draggedItem != null) { m_draggedItem.Update(); m_draggedItem.SetActive(true); Update(); RaiseDragEvent(); } AudioController.Play("Drag"); }