Rename collider variable
This commit is contained in:
parent
e980b83ce2
commit
e1d65c652e
@ -215,11 +215,11 @@ fn ball_collision_system(
|
|||||||
let velocity = &mut ball.velocity;
|
let velocity = &mut ball.velocity;
|
||||||
|
|
||||||
// check collision with walls
|
// check collision with walls
|
||||||
for (collider_entity, _collider, translation, sprite) in &mut collider_query.iter() {
|
for (collider_entity, collider, translation, sprite) in &mut collider_query.iter() {
|
||||||
let collision = collide(ball_translation.0, ball_size, translation.0, sprite.size);
|
let collision = collide(ball_translation.0, ball_size, translation.0, sprite.size);
|
||||||
if let Some(collision) = collision {
|
if let Some(collision) = collision {
|
||||||
// scorable colliders should be despawned and increment the scoreboard on collision
|
// scorable colliders should be despawned and increment the scoreboard on collision
|
||||||
if let &Collider::Scorable = _collider {
|
if let &Collider::Scorable = collider {
|
||||||
scoreboard.score += 1;
|
scoreboard.score += 1;
|
||||||
commands.despawn(collider_entity);
|
commands.despawn(collider_entity);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user