migratetion to 0.18.0

This commit is contained in:
2026-02-16 00:02:00 +00:00
parent a9040a4c9e
commit 4ef68c4e04
17 changed files with 1260 additions and 732 deletions
+3 -3
View File
@@ -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());