Skip to content

Commit

Permalink
Add insert and remove to InstanceCommands
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeenobit committed Jul 20, 2024
1 parent 4dcae9a commit 7716f06
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,16 @@ impl<'a, T: Kind> InstanceCommands<'a, T> {
pub fn as_entity(&mut self) -> &mut EntityCommands<'a> {
&mut self.0
}

pub fn insert(&mut self, bundle: impl Bundle) -> &mut Self {
self.0.insert(bundle);
self
}

pub fn remove<U: Component>(&mut self) -> &mut Self {
self.0.remove::<U>();
self
}
}

impl<'a, T: Kind> From<InstanceCommands<'a, T>> for Instance<T> {
Expand Down

0 comments on commit 7716f06

Please sign in to comment.