Removed code to set visibility of colliders and sprites, as it is no longer needed.

main
Yan Wittmann 2023-03-28 19:39:26 +02:00
parent 9dfc487e9a
commit 01147960cb
1 changed files with 12 additions and 12 deletions

View File

@ -90,19 +90,19 @@ class PhysicsElementsHandler:
current_closest_sprites[max_index] = (distance, collider)
# set visible false for all those that are not in the closest_sprites list
for collider in colliders:
found = False
for sprite in sorted_dynamic_sprites:
for _, c in closest_sprites[sprite]:
if c is collider:
found = True
break
if found:
break
collider.visible = not found
# for collider in colliders:
# found = False
# for sprite in sorted_dynamic_sprites:
# for _, c in closest_sprites[sprite]:
# if c is collider:
# found = True
# break
# if found:
# break
# collider.visible = not found
for sprite in sorted_dynamic_sprites:
sprite.visible = True
# for sprite in sorted_dynamic_sprites:
# sprite.visible = True
for sprite in sorted_dynamic_sprites:
collides_with = self.attempt_move(tick_data,