diff --git a/src/game/mod.rs b/src/game/mod.rs index 6d11b65..500b76e 100644 --- a/src/game/mod.rs +++ b/src/game/mod.rs @@ -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; diff --git a/src/input.rs b/src/input.rs index 63064ea..b4c6437 100644 --- a/src/input.rs +++ b/src/input.rs @@ -74,11 +74,11 @@ fn mouse_input( fn keyboard_input( keys: Res>, mut spawn_fire_breath_event_writer: EventWriter, - mut query: Query<&mut Transform, With>, + query: Query<&Transform, With>, ) { 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));