Skip to content

Commit

Permalink
docs: remove examples using joypad pressure
Browse files Browse the repository at this point in the history
Joypad pressure was removed from driver methods; this change updates
the README to remove references to it from the examples.
  • Loading branch information
wlsnmrk committed Jul 1, 2024
1 parent 418da5b commit 067fe6b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,13 +345,8 @@ var deviceID = 0;
node.PressJoypadButton(JoyButton.Y, deviceID);
node.ReleaseJoypadButton(JoyButton.Y, deviceID);

// you can simulate pressure for pressure-sensitive devices
var pressure = 0.8f;
node.PressJoypadButton(JoyButton.Y, deviceID, pressure);
node.ReleaseJoypadButton(JoyButton.Y, deviceID);

// you can combine pressing and releasing a button
node.TapJoypadButton(JoyButton.Y, deviceID, pressure);
node.TapJoypadButton(JoyButton.Y, deviceID);

// you can move an analog controller axis to a given position, with 0 being the rest position
// for instance:
Expand All @@ -367,7 +362,7 @@ node.MoveJoypadAxisTo(JoyAxis.RightX, -0.3f, deviceID);
node.ReleaseJoypadAxis(JoyAxis.RightX, deviceID);

// hold a controller button for 1.5 seconds
await node.HoldJoypadButtonFor(1.5f, JoyButton.Y, deviceID, pressure);
await node.HoldJoypadButtonFor(1.5f, JoyButton.Y, deviceID);
// hold a controller axis position for 1.5 seconds
await node.HoldJoypadAxisFor(1.5f, JoyAxis.RightX, -0.3f, deviceID);
```
Expand Down

0 comments on commit 067fe6b

Please sign in to comment.