Example #1
0
        bool HandleClicks(GamePadState now, GamePadState before)
        {
            if (GamePadHelper.IsShoulderPressed(now))
            {
                return(false);
            }

            // Left click
            if (GamePadHelper.IsPressDown(now.Buttons.A, before.Buttons.A))
            {
                _Input.Mouse.LeftButtonDown();
            }
            else if (GamePadHelper.IsPressUp(now.Buttons.A, before.Buttons.A))
            {
                _Input.Mouse.LeftButtonUp();
            }

            // Right click
            if (GamePadHelper.IsPressDown(now.Buttons.B, before.Buttons.B))
            {
                _Input.Mouse.RightButtonDown();
            }
            else if (GamePadHelper.IsPressUp(now.Buttons.B, before.Buttons.B))
            {
                _Input.Mouse.RightButtonUp();
            }

            return(false);
        }
Example #2
0
        bool HandleSekkusu(GamePadState now, GamePadState before)
        {
            // Speed
            if (GamePadHelper.IsPressUp(now.DPad.Up, before.DPad.Up))
            {
                _Scene.Pad.ChangeSpeed(Mathf.Clamp(_Scene.Pad.speed + 0.6f, _Scene.Pad.SpeedMin, _Scene.Pad.SpeedMax));
            }
            else if (GamePadHelper.IsPressUp(now.DPad.Down, before.DPad.Down))
            {
                _Scene.Pad.ChangeSpeed(Mathf.Clamp(_Scene.Pad.speed - 0.6f, _Scene.Pad.SpeedMin, _Scene.Pad.SpeedMax));
            }

            // Pose
            if (GamePadHelper.IsPressUp(now.DPad.Left, before.DPad.Left))
            {
                ChangePose(-1);
            }
            else if (GamePadHelper.IsPressUp(now.DPad.Right, before.DPad.Right))
            {
                ChangePose(1);
            }

            // Mode
            if (GamePadHelper.IsPressUp(now.Buttons.X, before.Buttons.X))
            {
                ToggleGrind();
            }
            if (GamePadHelper.IsPressUp(now.Buttons.Y, before.Buttons.Y))
            {
                TogglePiston();
            }

            // E*********n
            if (GamePadHelper.IsPressDown(now.Buttons.RightStick, before.Buttons.RightStick))
            {
                E*******e(false);
            }

            if (GamePadHelper.IsPressDown(now.Buttons.LeftStick, before.Buttons.LeftStick))
            {
                E*******e(true);
            }


            return(false);
        }