Azmyth.XNA.InputManager.ThumbUpPressed C# (CSharp) Method

ThumbUpPressed() public static method

public static ThumbUpPressed ( PlayerIndex player, ThumbSticks stick ) : bool
player PlayerIndex
stick ThumbSticks
return bool
        public static bool ThumbUpPressed(PlayerIndex player, ThumbSticks stick)
        {
            bool pressed = false;

            switch(stick)
            {
                case ThumbSticks.Left:
                    if (m_lastPadState[(int)player].ThumbSticks.Left.Y < 0.5f && m_padState[(int)player].ThumbSticks.Left.Y >= 0.5f)
                    {
                        pressed = true;
                    }
                    break;
                case ThumbSticks.Right:
                    if (m_lastPadState[(int)player].ThumbSticks.Right.Y < 0.5f && m_padState[(int)player].ThumbSticks.Right.Y >= 0.5f)
                    {
                        pressed = true;
                    }
                    break;
            }

            return pressed;
        }