From e35e746d5dbd8e8cea53c073a6ac54b2095127a9 Mon Sep 17 00:00:00 2001 From: Rob Parrett Date: Fri, 29 Nov 2024 15:48:57 -0700 Subject: [PATCH] Fix minor formatting issues --- .../12770_Implement_gamepads_as_entities.md | 20 +++++++++---------- ...5772_bevy_reflect_Add_Reflectable_trait.md | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/release-content/0.15/release-notes/12770_Implement_gamepads_as_entities.md b/release-content/0.15/release-notes/12770_Implement_gamepads_as_entities.md index d2b6a36df7..7ab54b9017 100644 --- a/release-content/0.15/release-notes/12770_Implement_gamepads_as_entities.md +++ b/release-content/0.15/release-notes/12770_Implement_gamepads_as_entities.md @@ -18,9 +18,9 @@ fn gamepad_system( if button_inputs.just_pressed( GamepadButton::new(gamepad, GamepadButtonType::South) ) { - println!("just pressed South"); - } - + info!("just pressed South"); + } + let right_trigger = button_axes .get(GamepadButton::new( gamepad, @@ -28,14 +28,14 @@ fn gamepad_system( )) .unwrap(); if right_trigger.abs() > 0.01 { - info!("RightTrigger2 value is {}", right_trigger); + info!("RightTrigger2 value is {}", right_trigger); } let left_stick_x = axes .get(GamepadAxis::new(gamepad, GamepadAxisType::LeftStickX)) .unwrap(); if left_stick_x.abs() > 0.01 { - info!("LeftStickX value is {}", left_stick_x); + info!("LeftStickX value is {}", left_stick_x); } } } @@ -46,18 +46,18 @@ In 0.15, we can write this much more simply as: ```rust fn gamepad_system(gamepads: Query<&Gamepad>) { for gamepad in &gamepads { - if gamepad.just_pressed(GamepadButton::South) { + if gamepad.just_pressed(GamepadButton::South) { println!("just pressed South"); - } - + } + let right_trigger = gamepad.get(GamepadButton::RightTrigger2).unwrap(); if right_trigger.abs() > 0.01 { - info!("RightTrigger2 value is {}", right_trigger); + info!("RightTrigger2 value is {}", right_trigger); } let left_stick_x = gamepad.get(GamepadAxis::LeftStickX).unwrap(); if left_stick_x.abs() > 0.01 { - info!("LeftStickX value is {}", left_stick_x); + info!("LeftStickX value is {}", left_stick_x); } } } diff --git a/release-content/0.15/release-notes/5772_bevy_reflect_Add_Reflectable_trait.md b/release-content/0.15/release-notes/5772_bevy_reflect_Add_Reflectable_trait.md index 0c929cdadc..897dc73f41 100644 --- a/release-content/0.15/release-notes/5772_bevy_reflect_Add_Reflectable_trait.md +++ b/release-content/0.15/release-notes/5772_bevy_reflect_Add_Reflectable_trait.md @@ -1,4 +1,4 @@ -`bevy_reflect`] is powered by many different traits working together +[`bevy_reflect`] is powered by many different traits working together to provide the full reflection API. These include traits like [`Reflect`], but also other traits like [`TypePath`], [`Typed`], and [`GetTypeRegistration`]. @@ -13,4 +13,4 @@ supertraits of `Reflectable`, allowing it to be used in place of all of them whe [`TypePath`]: https://docs.rs/bevy_reflect/0.15/bevy_reflect/trait.TypePath.html [`Typed`]: https://docs.rs/bevy_reflect/0.15/bevy_reflect/trait.Typed.html [`GetTypeRegistration`]: https://docs.rs/bevy_reflect/0.15/bevy_reflect/trait.GetTypeRegistration.html -[`Reflectable`]: https://docs.rs/bevy_reflect/0.15/bevy_reflect/trait.Reflectable.html \ No newline at end of file +[`Reflectable`]: https://docs.rs/bevy_reflect/0.15/bevy_reflect/trait.Reflectable.html