Exemple #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));
 }
Exemple #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);
    }
Exemple #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;
 }
Exemple #6
0
 public UniMoveButtonEventArgs(PSMoveButton button)
 {
     this.button = button;
 }
    // 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;
    }
Exemple #8
0
 public bool GetButtonReleased(PSMoveButton button)
 {
     return(((int)button & buttonsReleased) != 0);
 }
Exemple #9
0
 public bool GetButtonPressed(PSMoveButton button)
 {
     return(((int)button & buttonsPressed) != 0);
 }
Exemple #10
0
 public bool GetButtonUp(PSMoveButton button)
 {
     return(!GetButtonDown(button));
 }
Exemple #11
0
        // **************
        // Buttons
        // **************

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

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