Exemple #1
0
        /// <summary>
        /// Unity Update method.
        /// </summary>
        protected virtual void Update()
        {
            // Tooltip Popup
            if (IsMouseOver && !string.IsNullOrEmpty(Tooltip))
            {
                _tooltipCount += Time.deltaTime;

                if (_tooltipCount > TooltipDelay)
                {
                    TooltipManager.PopUp(Tooltip);
                }
            }

            // Call the MouseDown event each step the mouse is down
            if (IsLeftMouseDown && WhileMouseDown != null)
            {
                WhileMouseDown();
            }
        }