Ejemplo n.º 1
0
 /// <summary>
 /// Returns true if "button" is pressed down this instant.
 /// </summary>
 public bool GetButtonDown(PSMoveButton b)
 {
     if (disconnected)
     {
         return(false);
     }
     return(((prevButtons & (uint)b) == 0) && ((currentButtons & (uint)b) != 0));
 }
Ejemplo n.º 2
0
    /// <summary>
    /// Returns true if "button" is currently down.
    /// </summary>
    public bool GetButton(PSMoveButton b)
    {
        if (disconnected)
        {
            return(false);
        }

        return((currentButtons & (uint)b) != 0);
    }
Ejemplo n.º 3
0
        // Released This Frame
        public bool GetButtonReleasedThisFrame(PSMoveButton ButtonMask)
        {
            bool ReleasedThisFrame = false;

            if (RawControllerData.IsValid() && RawControllerData.IsConnected)
            {
                ReleasedThisFrame =
                    (RawControllerPreviousButtons & (UInt32)ButtonMask) != 0 &&
                    (RawControllerData.Buttons & (UInt32)ButtonMask) == 0;
            }

            return(ReleasedThisFrame);
        }
    /// <summary>
    /// Returns true if "button" is released this instant.
    /// </summary>
    public bool GetButtonUp(PSMoveButton b)
    {
        if (disconnected) return false;

        return ((prevButtons & (uint)b) != 0) &&  ((currentButtons & (uint)b) == 0);
    }
 public UniMoveButtonEventArgs(PSMoveButton button)
 {
     this.button = button;
 }
Ejemplo n.º 6
0
 public UniMoveButtonEventArgs(PSMoveButton button)
 {
     this.button = button;
 }
Ejemplo n.º 7
0
    // Released This Frame
    public bool GetButtonReleasedThisFrame(PSMoveButton ButtonMask)
    {
        bool ReleasedThisFrame = false;

        if (RawControllerData.IsValid() && RawControllerData.IsConnected)
        {
            ReleasedThisFrame =
                (RawControllerPreviousButtons & (UInt32)ButtonMask) != 0 &&
                (RawControllerData.Buttons & (UInt32)ButtonMask) == 0;
        }

        return ReleasedThisFrame;
    }
Ejemplo n.º 8
0
 public bool GetButtonReleased(PSMoveButton button)
 {
     return(((int)button & buttonsReleased) != 0);
 }
Ejemplo n.º 9
0
 public bool GetButtonPressed(PSMoveButton button)
 {
     return(((int)button & buttonsPressed) != 0);
 }
Ejemplo n.º 10
0
 public bool GetButtonUp(PSMoveButton button)
 {
     return(!GetButtonDown(button));
 }
Ejemplo n.º 11
0
        // **************
        // Buttons
        // **************

        public bool GetButtonDown(PSMoveButton button)
        {
            return(((int)button & buttons) != 0);
        }
Ejemplo n.º 12
0
    /// <summary>
    /// Returns true if "button" is currently down.
    /// </summary
    public bool IsButtonDown(PSMoveButton b)
    {
        if (disconnected) return false;

        return ((currentButtons & (uint)b) != 0);
    }
Ejemplo n.º 13
0
 public bool GetButtonUp(PSMoveButton button)
 {
     return !GetButtonDown(button);
 }
Ejemplo n.º 14
0
 public bool GetButtonReleased(PSMoveButton button)
 {
     return (((int)button & buttonsReleased) != 0);
 }
Ejemplo n.º 15
0
 public bool GetButtonPressed(PSMoveButton button)
 {
     return (((int)button & buttonsPressed) != 0);
 }
Ejemplo n.º 16
0
 // **************
 // Buttons
 // **************
 public bool GetButtonDown(PSMoveButton button)
 {
     return (((int)button & buttons) != 0);
 }