Skip to content

Commit

Permalink
'Replace fire effect and remove logs.info
Browse files Browse the repository at this point in the history
  • Loading branch information
cnmorales committed Nov 18, 2023
1 parent ff3168e commit a53d5e5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Binary file removed assets/fire_particle.png
Binary file not shown.
Binary file added assets/textures/fire_breath.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 7 additions & 6 deletions src/game/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,5 @@ fn keyboard_input(
1000,
player_position,
));
info!("Event sent");
}
}

0 comments on commit a53d5e5

Please sign in to comment.