external config

This commit is contained in:
2026-03-18 23:19:58 +00:00
parent a5154f73dd
commit 15c0d1c7a2
9 changed files with 87 additions and 10 deletions
+3 -1
View File
@@ -1,3 +1,4 @@
use crate::config::GameConfig;
use crate::constants::TILE_SIZE;
use crate::constants::*;
use crate::entities::shared_components::Ambulatory;
@@ -40,9 +41,10 @@ pub fn spawn_rabbits(
mut commands: Commands,
asset_server: Res<AssetServer>,
mut rng_q: Query<&mut WyRand, With<GlobalRng>>,
config: Res<GameConfig>,
) {
if let Ok(mut rng) = rng_q.single_mut() {
for _ in 0..15 {
for _ in 0..config.spawn_counts.rabbits {
let rab = commands
.spawn(Rabbit::new(
&asset_server,