Make Seed a component
Conceptually it works better as a resource, but that's an extra layer of complexity for the upcoming automatic distribution work.
This commit is contained in:
parent
9ab8db41de
commit
d89d539f3b
5 changed files with 15 additions and 29 deletions
|
|
@ -96,10 +96,10 @@ impl Plugin for GamePlugin {
|
|||
info!("Will retrieve seed from peer => {peer}");
|
||||
}
|
||||
DataSource::Seed(seed) => {
|
||||
app.insert_resource(seed);
|
||||
app.world_mut().spawn(seed);
|
||||
}
|
||||
DataSource::None => {
|
||||
app.insert_resource(Seed::random());
|
||||
app.world_mut().spawn(Seed::random());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue