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::item::{spawn_prefab, MiscPrefab};
|
||||
@@ -47,9 +48,10 @@ pub fn spawn_pigs(
|
||||
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..5 {
|
||||
for _ in 0..config.spawn_counts.pigs {
|
||||
let pig = commands
|
||||
.spawn(Pig::new(
|
||||
&asset_server,
|
||||
|
||||
Reference in New Issue
Block a user