diff --git a/assets/fire_particle.png b/assets/fire_particle.png deleted file mode 100644 index 33bfab7..0000000 Binary files a/assets/fire_particle.png and /dev/null differ diff --git a/assets/textures/fire_breath.png b/assets/textures/fire_breath.png new file mode 100644 index 0000000..0405d39 Binary files /dev/null and b/assets/textures/fire_breath.png differ diff --git a/src/game/player.rs b/src/game/player.rs index 0fdb919..ff03c0e 100644 --- a/src/game/player.rs +++ b/src/game/player.rs @@ -80,21 +80,22 @@ fn spawn_fire_breath( position, } in spawn_fire_breath_event_reader.read() { - info!("event received"); commands.spawn(ParticleSystemBundle { transform: Transform::from_translation(position.extend(1.0)), + particle_system: ParticleSystem { max_particles: 10_000, - texture: ParticleTexture::Sprite(asset_server.load("fire_particle.png")), - spawn_rate_per_second: 25.0.into(), + texture: ParticleTexture::Sprite(asset_server.load("textures/fire_breath.png")), + spawn_rate_per_second: 10.0.into(), initial_speed: JitteredValue::jittered(3.0, -1.0..1.0), - lifetime: JitteredValue::jittered(8.0, -2.0..2.0), + lifetime: JitteredValue::jittered(4.0, -1.0..1.0), /* color: ColorOverTime::Gradient(Gradient::new(vec![ ColorPoint::new(Color::WHITE, 0.0), ColorPoint::new(Color::rgba(0.0, 0.0, 1.0, 0.0), 1.0), ])), */ - looping: true, - system_duration_seconds: 3.0, + looping: false, + despawn_on_finish : true, + system_duration_seconds: 1.0, ..ParticleSystem::default() }, ..ParticleSystemBundle::default() diff --git a/src/input.rs b/src/input.rs index aed07b3..8b27271 100644 --- a/src/input.rs +++ b/src/input.rs @@ -90,6 +90,5 @@ fn keyboard_input( 1000, player_position, )); - info!("Event sent"); } } \ No newline at end of file