migratetion to 0.18.0
This commit is contained in:
@@ -6,7 +6,7 @@ use crate::world::tiles::tilemap;
|
||||
use crate::world::VisibleGameEntity;
|
||||
use bevy::prelude::*;
|
||||
use bevy_rand::prelude::*;
|
||||
use rand::Rng;
|
||||
use rand::RngExt;
|
||||
|
||||
#[derive(Bundle)]
|
||||
pub struct Pig {
|
||||
@@ -45,7 +45,7 @@ pub struct PigDropTimer(pub Timer);
|
||||
pub fn spawn_pigs(
|
||||
mut commands: Commands,
|
||||
asset_server: Res<AssetServer>,
|
||||
mut rng_q: Query<&mut Entropy<WyRand>, With<Global>>,
|
||||
mut rng_q: Query<&mut WyRand, With<GlobalRng>>,
|
||||
) {
|
||||
if let Ok(mut rng) = rng_q.single_mut() {
|
||||
for _ in 0..5 {
|
||||
@@ -70,7 +70,7 @@ pub fn pig_drop_system(
|
||||
time: Res<Time>,
|
||||
mut pigs: Query<(&mut PigDropTimer, &Transform)>,
|
||||
mut tilemap: ResMut<tilemap::TileMap>,
|
||||
mut rng_q: Query<&mut Entropy<WyRand>, With<Global>>,
|
||||
mut rng_q: Query<&mut WyRand, With<GlobalRng>>,
|
||||
) {
|
||||
for (mut timer, transform) in &mut pigs {
|
||||
timer.tick(time.delta());
|
||||
|
||||
Reference in New Issue
Block a user