diff --git a/crates/border-wars/src/map/selection.rs b/crates/border-wars/src/map/selection.rs index 8967a3f..3a65939 100644 --- a/crates/border-wars/src/map/selection.rs +++ b/crates/border-wars/src/map/selection.rs @@ -5,15 +5,15 @@ use bevy::sprite::Anchor; use super::Tile; -/// A component that represents a selected tile. +/// A component that mark a tile as selected. #[derive(Component)] pub struct SelectedTile; -/// A component that represents the selection. +/// A component that mark an entity as a selection. #[derive(Component)] struct Selection; -/// A event that is triggered when a mouse button is clicked in the world. +/// A event that is triggered when a mouse button is clicked. /// /// The event contains the position of the cursor in the world. #[derive(Event)] @@ -31,7 +31,7 @@ impl Plugin for SelectorPlugin { } } -/// Handles the mouse click and gets the position of the cursor in the world.* +/// Handles the mouse click and gets the position of the cursor in the world. /// Finally, it sends an event with the position of the cursor. fn mouse_handler( mouse_button_input: Res>, @@ -64,7 +64,7 @@ fn mouse_handler( } /// Selects the closest tile to the cursor and marks it as selected. -/// It also marks the old selection as unselected. +/// It also unmarks the old selection if there is one. fn select_closest_tile( mut commands: Commands, tiles: Query<(Entity, &Transform, &Tile)>,