Ejemplo n.º 1
0
        /// <summary>
        /// Executes the OnHoverEnter 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 ExecuteHoverEnter(bool forcedExecution = false)
        {
            if (forcedExecution)
            {
                if (debugThis)
                {
                    Debug.Log("DebugMode - UIButton - " + name + " | Executing OnHoverEnter initiated through forcedExecution");
                }
                OnHoverEnter.Invoke();
                return;
            }

            if (useOnHoverEnter)
            {
                if (debugThis)
                {
                    Debug.Log("DebugMode - UIButton - " + name + " | Executing OnHoverEnter");
                }
                if (interactable && onHoverEnterReady)
                {
                    OnHoverEnter.Invoke();
                    if (onHoverEnterDisableInterval > 0)
                    {
                        StartCoroutine("DisableOnHoverEnter");
                    }
                }
            }
        }
Ejemplo n.º 2
0
 public void HoverEnter()
 {
     OnHoverEnter?.Invoke(this);
 }