Beyond_Beyaan.BBButton.MouseHover C# (CSharp) Метод

MouseHover() публичный Метод

public MouseHover ( int x, int y, float frameDeltaTime ) : bool
x int
y int
frameDeltaTime float
Результат bool
        public bool MouseHover(int x, int y, float frameDeltaTime)
        {
            if (x >= _xPos && x < _xPos + _width && y >= _yPos && y < _yPos + _height)
            {
                if (pulse < 0.6f)
                {
                    pulse = 0.9f;
                }
                if (Active)
                {
                    if (direction)
                    {
                        pulse += frameDeltaTime / 2;
                        if (pulse > 0.9f)
                        {
                            direction = !direction;
                            pulse = 0.9f;
                        }
                    }
                    else
                    {
                        pulse -= frameDeltaTime / 2;
                        if (pulse < 0.6f)
                        {
                            direction = !direction;
                            pulse = 0.6f;
                        }
                    }
                }
                if (_toolTip != null)
                {
                    _toolTip.SetShowing(true);
                    _toolTip.MouseHover(x, y, frameDeltaTime);
                }
                return true;
            }
            if (pulse > 0)
            {
                pulse -= frameDeltaTime * 2;
                if (pulse < 0)
                {
                    pulse = 0;
                }
            }
            if (_toolTip != null)
            {
                _toolTip.SetShowing(false);
            }
            return false;
        }