public void OnPointerClick(PointerEventData eventData) { if (eventData.button == PointerEventData.InputButton.Left) { #if UNITY_STANDALONE if (DragableManager.Instance.IsDraging) { ItemAgent source = DragableManager.Instance.Current as ItemAgent; if (source) { BackpackManager.Instance.DiscardItem(source.MItemInfo); AmountManager.Instance.SetPosition(eventData.position); source.FinishDrag(); } } else { BackpackManager.Instance.OpenDiscardWindow(); } #elif UNITY_ANDROID BackpackManager.Instance.OpenDiscardWindow(); TipsManager.Instance.ShowText(transform.position, "将物品拖拽至此按钮丢弃,或者点击该按钮进行选取。", 3); #endif } }