-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
17 additions
and
71 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 15 additions & 15 deletions
30
crates/forky/forky_bevy/src/components/orphan_children.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
use bevy_derive::Deref; | ||
use bevy_derive::DerefMut; | ||
use bevy_ecs::prelude::*; | ||
use bevy_hierarchy::prelude::*; | ||
// use bevy_derive::Deref; | ||
// use bevy_derive::DerefMut; | ||
// use bevy_ecs::prelude::*; | ||
// use bevy_hierarchy::prelude::*; | ||
|
||
/// Container for children that are not in the hierarchy. | ||
#[derive(Component, Deref, DerefMut)] | ||
pub struct OrphanChildren(pub Vec<Entity>); | ||
// /// Container for children that are not in the hierarchy. | ||
// #[derive(Component, Deref, DerefMut)] | ||
// pub struct OrphanChildren(pub Vec<Entity>); | ||
|
||
impl OrphanChildren { | ||
/// does not account for if this orphan has orphan children | ||
pub fn despawn(&self, commands: &mut Commands) { | ||
for child in self.0.iter() { | ||
commands.entity(*child).despawn_recursive(); | ||
} | ||
} | ||
} | ||
// impl OrphanChildren { | ||
// /// does not account for if this orphan has orphan children | ||
// pub fn despawn(&self, commands: &mut Commands) { | ||
// for child in self.0.iter() { | ||
// commands.entity(*child).despawn_recursive(); | ||
// } | ||
// } | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,5 +31,4 @@ pub mod exports { | |
pub use serde; | ||
pub use serde::Deserialize; | ||
pub use serde::Serialize; | ||
pub use typetag; | ||
} |