spru_bevy/client/
command.rs1use bevy::prelude;
2use derive_where::derive_where;
3
4#[derive_where(Debug; spru::common::Seed<Client::Common>)]
5pub struct Init<Client: super::ClientSSS> {
6 pub seed: spru::common::Seed<Client::Common>,
7}
8
9impl<Client: super::ClientSSS> prelude::Command for Init<Client> {
10 fn apply(self, world: &mut bevy::ecs::world::World) {
11 let Self { seed } = self;
12
13 let mut command_queue = bevy::ecs::world::CommandQueue::default();
14
15 super::system::init::<Client>(seed, world, &mut command_queue);
16
17 command_queue.apply(world);
18 }
19}