From 33c62311a725bec67f3231d55beb277cfba7c639 Mon Sep 17 00:00:00 2001 From: Tomato <67799071+100-TomatoJuice@users.noreply.github.com> Date: Sat, 16 Sep 2023 13:39:57 -0700 Subject: [PATCH] Add `set_gamepad()` doc --- examples/register_gamepads.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/register_gamepads.rs b/examples/register_gamepads.rs index 0f6050bf..bf978317 100644 --- a/examples/register_gamepads.rs +++ b/examples/register_gamepads.rs @@ -1,4 +1,5 @@ //! Demonstrates how to register gamepads in local multiplayer fashion + use bevy::{prelude::*, utils::HashMap}; use leafwing_input_manager::prelude::*; @@ -55,6 +56,8 @@ fn join( input_map: InputMap::default() .insert(GamepadButtonType::South, Action::Jump) .insert(GamepadButtonType::Select, Action::Disconnect) + // Make sure to set the gamepad or all gamepads will be used! + .set_gamepad(gamepad) .build(), }) .insert(Player { gamepad })