/// <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)); }
/// <summary> /// Returns true if "button" is currently down. /// </summary> public bool GetButton(PSMoveButton b) { if (disconnected) { return(false); } return((currentButtons & (uint)b) != 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; }
// 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; }
public bool GetButtonReleased(PSMoveButton button) { return(((int)button & buttonsReleased) != 0); }
public bool GetButtonPressed(PSMoveButton button) { return(((int)button & buttonsPressed) != 0); }
public bool GetButtonUp(PSMoveButton button) { return(!GetButtonDown(button)); }
// ************** // 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); }
public bool GetButtonUp(PSMoveButton button) { return !GetButtonDown(button); }
public bool GetButtonReleased(PSMoveButton button) { return (((int)button & buttonsReleased) != 0); }
public bool GetButtonPressed(PSMoveButton button) { return (((int)button & buttonsPressed) != 0); }
// ************** // Buttons // ************** public bool GetButtonDown(PSMoveButton button) { return (((int)button & buttons) != 0); }