Spawn

Trait Spawn 

Source
pub trait Spawn:
    'static
    + Send
    + Sync {
    type Output: Bundle;

    // Required method
    fn spawn(&self, world: &World, entity: Entity) -> Self::Output;
}
👎Deprecated since 0.2.4: see documentation at https://github.com/Zeenobit/moonshine_spawn for details
Expand description

Represents a type which spawns an Entity.

§Usage

The output of a spawn is a Bundle which is inserted into the given spawned Entity.

By default, anything which implements SpawnOnce and Clone also implements this trait. This includes bundles which can be cloned.

Required Associated Types§

Source

type Output: Bundle

👎Deprecated since 0.2.4: see documentation at https://github.com/Zeenobit/moonshine_spawn for details

Required Methods§

Source

fn spawn(&self, world: &World, entity: Entity) -> Self::Output

👎Deprecated since 0.2.4: see documentation at https://github.com/Zeenobit/moonshine_spawn for details

Implementors§