Skip to content

Commit

Permalink
Fix PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cnmorales committed Nov 18, 2023
1 parent a3db188 commit 5b1d43a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/game/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ pub use constants::*;
pub use enemy::Enemy;
pub use hitpoints::Hitpoints;
pub use level::BorderTile;
pub use player::Player;
pub use player::SpawnFireBreathEvent;
pub use player::{Player, SpawnFireBreathEvent};
pub use plugin::GamePlugin;
4 changes: 2 additions & 2 deletions src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ fn mouse_input(
fn keyboard_input(
keys: Res<Input<KeyCode>>,
mut spawn_fire_breath_event_writer: EventWriter<SpawnFireBreathEvent>,
mut query: Query<&mut Transform, With<Player>>,
query: Query<&Transform, With<Player>>,
) {
if keys.pressed(KeyCode::Key1) {
// Key number 1 is being held down
let player_transform = query.single_mut();
let player_transform = query.single();
let player_position = player_transform.translation.truncate();

spawn_fire_breath_event_writer.send(SpawnFireBreathEvent::new(1000, player_position));
Expand Down

0 comments on commit 5b1d43a

Please sign in to comment.