public void ClearAllWasPressedState(int numFrames) { if (b0 != 0) { GamePadInput pad = GamePadInput.GetGamePad0(); GamePadInput.Button b = pad.GetButton(b0); b.ClearAllWasPressedState(); b.IgnoreUntilReleased = true; if (b1 != 0) { b = pad.GetButton(b0); b.ClearAllWasPressedState(); b.IgnoreUntilReleased = true; } if (numFrames > 0) { GamePadInput.ClearAllWasPressedState(numFrames); } } for (int i = 0; i < keys.Count; i++) { KeyboardInput.ClearAllWasPressedState(keys[i]); } } // end of ClearAllWasPressedState()
} // end of ClearAllWasPressedState() /// <summary> /// Ignore all buttons and keys associated with this metabutton /// until they have been released. Note these happen independently, so if /// this metabutton maps to A & B, and A & B are pressed when this is called, /// then as soon as A is released it can be pressed, even though B has not /// been released yet. /// </summary> public void IgnoreUntilReleased() { if (b0 != 0) { GamePadInput.IgnoreUntilReleased(b0); if (b1 != 0) { GamePadInput.IgnoreUntilReleased(b1); } } for (int i = 0; i < keys.Count; ++i) { KeyboardInput.IgnoreUntilReleased(keys[i]); } }