Skip to content

Commit 1942a4b

Browse files
committed
Implement feedback
1 parent f4f8f9a commit 1942a4b

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

crates/bevy_hierarchy/src/child_builder.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ impl Command for RemoveChildren {
181181

182182
/// Command that removes the parent of an entity, and removes that entity from the parent's [`Children`].
183183
pub struct RemoveParent {
184-
/// `Entity` which parent must be removed.
184+
/// `Entity` whose parent must be removed.
185185
pub child: Entity,
186186
}
187187

@@ -213,7 +213,7 @@ impl<'w, 's, 'a> ChildBuilder<'w, 's, 'a> {
213213
e
214214
}
215215

216-
/// Spawns an [`Entity`] with no components and inserts it into the children defined by the [`ChildBuilder`] which adds the [`Parent`] component to it.
216+
/// Spawns an [`Entity`] with no components and inserts it into the children defined by the [`ChildBuilder`] whose adds the [`Parent`] component to it.
217217
pub fn spawn_empty(&mut self) -> EntityCommands<'w, 's, '_> {
218218
let e = self.commands.spawn_empty();
219219
self.push_children.children.push(e.id());
@@ -348,7 +348,7 @@ impl<'w> WorldChildBuilder<'w> {
348348
self.world.entity_mut(entity)
349349
}
350350

351-
/// Spawns an [`Entity`] with no components and inserts it into the children defined by the [`WorldChildBuilder`] which adds the [`Parent`] component to it.
351+
/// Spawns an [`Entity`] with no components and inserts it into the children defined by the [`WorldChildBuilder`] whose adds the [`Parent`] component to it.
352352
pub fn spawn_empty(&mut self) -> EntityMut<'_> {
353353
let entity = self.world.spawn(Parent(self.parent)).id();
354354
push_child_unchecked(self.world, self.parent, entity);

crates/bevy_transform/src/commands.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::{GlobalTransform, Transform};
1111
/// Command similar to [`AddChild`], but updating the child transform to keep
1212
/// it at the same [`GlobalTransform`].
1313
///
14-
/// You most likely want to use [`BuildChildrenTransformExt::set_parent_keep_global_transform`]
14+
/// You most likely want to use [`BuildChildrenTransformExt::set_parent_in_place`]
1515
/// method on [`EntityCommands`] instead.
1616
pub struct AddChildInPlace {
1717
/// Parent entity to add the child to.
@@ -40,11 +40,11 @@ impl Command for AddChildInPlace {
4040
/// Command similar to [`RemoveParent`], but updating the child transform to keep
4141
/// it at the same [`GlobalTransform`].
4242
///
43-
/// You most likely want to use [`BuildChildrenTransformExt::remove_parent_keep_global_transform`]
43+
/// You most likely want to use [`BuildChildrenTransformExt::remove_parent_in_place`]
4444
/// method on [`EntityCommands`] instead.
45-
struct RemoveParentInPlace {
46-
/// `Entity` which parent must be removed.
47-
child: Entity,
45+
pub struct RemoveParentInPlace {
46+
/// `Entity` whose parent must be removed.
47+
pub child: Entity,
4848
}
4949
impl Command for RemoveParentInPlace {
5050
fn write(self, world: &mut World) {

examples/transforms/global_vs_local_translation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ fn setup(
7070
}),
7171
..default()
7272
},
73-
ChangeGlobal,
73+
ChangeLocal,
7474
Move,
7575
ToggledBy(KeyCode::Key1),
7676
))

0 commit comments

Comments
 (0)