Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
alice-i-cecile committed Jul 12, 2022
1 parent d751954 commit f284c8c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 0 additions & 2 deletions examples/axis_inputs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ fn spawn_player(mut commands: Commands) {
SingleGamepadAxis::symmetric(GamepadAxisType::RightStickX, 0.1),
Action::Rudder,
)
// Listen for events on the first gamepad
.set_gamepad(Gamepad(0))
.build(),
});
}
Expand Down
2 changes: 2 additions & 0 deletions examples/multiplayer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ impl PlayerBundle {
// This is a quick and hacky solution:
// you should coordinate with the `Gamepads` resource to determine the correct gamepad for each player
// and gracefully handle disconnects
// Note that this step is not required:
// if it is skipped all input maps will read from all connected gamepads
.set_gamepad(Gamepad(0))
.build(),
Player::Two => InputMap::new([
Expand Down
5 changes: 0 additions & 5 deletions examples/single_player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,6 @@ impl PlayerBundle {
use ArpgAction::*;
let mut input_map = InputMap::default();

// This is a quick and hacky solution:
// you should coordinate with the `Gamepads` resource to determine the correct gamepad for each player
// and gracefully handle disconnects
input_map.set_gamepad(Gamepad(0));

// Movement
input_map.insert(KeyCode::Up, Up);
input_map.insert(GamepadButtonType::DPadUp, Up);
Expand Down

0 comments on commit f284c8c

Please sign in to comment.