-
Notifications
You must be signed in to change notification settings - Fork 4
GamepadDevice class reference
bool GetButton(Button btn)
- Gets whether the button is pressed
bool GetButtonDown(Button btn)
- Gets whether the button was just pressed this frame
bool GetButtonUp(Button btn)
- Gets whether the button was just released this frame
float GetAxis(Axis axis)
- Gets the value of the given axis
void Vibrate(float magnitude, int duration)
- Start a rumble effect at the given magnitude for the given number of milliseconds (note: not all gamepads support vibration)
void StopVibration()
- Stops any previously started vibration
GamepadState CurrentState { get; }
- Gets a snapshot of the current gamepad state
Event<GamepadButtonPressedHandler> OnButtonPressed
- Event triggered when a button is pressed
Event<GamepadButtonReleasedHandler> OnButtonReleased
- Event triggered when a button is released
StringView Name { get; }
- Gets the name of the gamepad device
Getting Started
Drawing Sprites
Loading & Applying Effects
Loading Textures
Creating vertex & index buffers and drawing geometry
Using render buffers
Playing sound effects & music
Routing sound through buses & applying filters
Game
GameWindow
GraphicsDevice
SpriteBatch
Audio
Keyboard
Mouse
GamepadDevice