KindCommands

Trait KindCommands 

Source
pub trait KindCommands<'w, 's, 'a> {
    // Required methods
    fn spawn_with_kind<T: EntityKind>(
        self,
        bundle: T::Bundle,
    ) -> EntityKindCommands<'w, 's, 'a, T>;
    fn with_kind<T: EntityKind>(
        self,
        kind: &T,
    ) -> EntityKindCommands<'w, 's, 'a, T>;
}
Expand description

Extension trait which provides EntityKind support for Commands.

Required Methods§

Source

fn spawn_with_kind<T: EntityKind>( self, bundle: T::Bundle, ) -> EntityKindCommands<'w, 's, 'a, T>

Spawns a new Entity with given EntityKind and returns an EntityKindCommands for it.

Source

fn with_kind<T: EntityKind>(self, kind: &T) -> EntityKindCommands<'w, 's, 'a, T>

Returns a new EntityKindCommands for some EntityKind.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'w, 's, 'a> KindCommands<'w, 's, 'a> for &'a mut Commands<'w, 's>

Source§

fn spawn_with_kind<T: EntityKind>( self, bundle: T::Bundle, ) -> EntityKindCommands<'w, 's, 'a, T>

Source§

fn with_kind<T: EntityKind>(self, kind: &T) -> EntityKindCommands<'w, 's, 'a, T>

Implementors§