SpawnOnce

Trait SpawnOnce 

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

    // Required method
    fn spawn_once(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 exactly once.

§Usage

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

By default, all bundles implement this trait.

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_once(self, world: &World, entity: Entity) -> Self::Output

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

Implementors§