コード例 #1
0
        public static void UiUnBindLongPressCancel(Component but, UnityAction longPress)
        {
            LongPressEventTrigger button = but as LongPressEventTrigger;

            if (null != longPress)
            {
                button.onLongPressCancel.RemoveListener(longPress);
            }
            button.onLongPressCancel.RemoveAllListeners();
            button.onLongPressCancel.Invoke();
        }
コード例 #2
0
        public static void UiBindLongPressCancel(Component but, UnityAction longPress)
        {
            LongPressEventTrigger button = but as LongPressEventTrigger;

            button.onLongPressCancel.AddListener(longPress);
        }