save
All checks were successful
Rust Checks / checks (push) Successful in 2m43s

This commit is contained in:
CoCo_Sol 2024-04-03 21:39:46 +02:00
parent f14c154c11
commit 83129111c2

View file

@ -29,9 +29,12 @@ fn setup_ownership_resources(mut commands: Commands) {
commands.insert_resource(OwnershipColorContrast(0.4));
}
/// The type condition for update ownership.
type OwnershipUpdate = (Changed<Owner>, Changed<Sprite>);
/// Render the ownership of the tiles by applying colors.
fn render_ownership(
mut query: Query<(&mut Sprite, &Owner), Changed<Owner>>,
mut query: Query<(&mut Sprite, &Owner), OwnershipUpdate>,
contrast: Res<OwnershipColorContrast>,
) {
for (mut sprite, owner) in query.iter_mut() {