Пример #1
0
        /// <summary>
        /// Executes the OnHoverExit trigger. You can force an execution of this trigger (regardless if it's enabled or not) by calling this method with forcedExecution set to TRUE
        /// </summary>
        /// <param name="forcedExecution">Fires this trigger regardless if it is enabled or not (default:false)</param>
        private void ExecuteHoverExit(bool forcedExecution = false)
        {
            if (forcedExecution)
            {
                if (debugThis)
                {
                    Debug.Log("DebugMode - UIButton - " + name + " | Executing OnHoverExit initiated through forcedExecution");
                }
                OnHoverExit.Invoke();
                return;
            }

            if (useOnHoverExit)
            {
                if (debugThis)
                {
                    Debug.Log("DebugMode - UIButton - " + name + " | Executing OnHoverExit");
                }
                if (interactable && onHoverExitReady)
                {
                    OnHoverExit.Invoke();
                    if (onHoverExitDisableInterval > 0)
                    {
                        StartCoroutine("DisableOnHoverExit");
                    }
                }
            }
        }
Пример #2
0
        /// <summary>
        /// Executes the OnLongClick trigger. You can force an execution of this trigger (regardless if it's enabled or not) by calling this method with forcedExecution set to TRUE
        /// </summary>
        /// <param name="forcedExecution">Fires this trigger regardless if it is enabled or not (default:false)</param>
        public void ExecuteLongClick(bool forcedExecution = false)
        {
            if (forcedExecution)
            {
                if (debugThis)
                {
                    Debug.Log("DebugMode - UIButton - " + name + " | Executing OnLongClick initiated through forcedExecution");
                }
                OnLongClick.Invoke();
                return;
            }

            if (useOnLongClick)
            {
                if (debugThis)
                {
                    Debug.Log("DebugMode - UIButton - " + name + " | Executing OnLongClick");
                }
                if (interactable)
                {
                    OnLongClick.Invoke();
                }
                if (!interactable & useOnHoverExit & onHoverExitReady)
                {
                    OnHoverExit.Invoke();
                }
            }
        }
Пример #3
0
 public void HoverExit()
 {
     OnHoverExit?.Invoke(this);
 }