external config
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user