diff --git a/README.md b/README.md index 9bbc8a19..ad6b0fa1 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ fn setup(mut effects: ResMut>) { // Create the effect asset let effect = EffectAsset::new( // Maximum number of particles alive at a time - vec![32768], + 32768, // Spawn at a rate of 5 particles per second Spawner::rate(5.0.into()), // Move the expression module into the asset diff --git a/examples/2d.rs b/examples/2d.rs index 4f4d67d9..aa755644 100644 --- a/examples/2d.rs +++ b/examples/2d.rs @@ -85,7 +85,7 @@ fn setup( // By default the asset spawns the particles at Z=0. let spawner = Spawner::rate(30.0.into()); let effect = effects.add( - EffectAsset::new(vec![4096], spawner, module) + EffectAsset::new(4096, spawner, module) .with_name("2d") .init(init_pos) .init(init_vel) diff --git a/examples/activate.rs b/examples/activate.rs index 9ca0ccea..202582fb 100644 --- a/examples/activate.rs +++ b/examples/activate.rs @@ -115,7 +115,7 @@ fn setup( let round = RoundModifier::constant(&mut module, 1.0); let effect = effects.add( - EffectAsset::new(vec![32768], spawner, module) + EffectAsset::new(32768, spawner, module) .with_name("activate") .init(init_pos) .init(init_vel) @@ -159,7 +159,7 @@ fn setup( fn update( mut q_balls: Query<(&mut Ball, &mut Transform, &Children)>, - mut q_spawner: Query<&mut EffectSpawner>, + mut q_spawner: Query<&mut EffectInitializers>, mut q_text: Query<&mut Text, With>, time: Res