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) current_closest_sprites[max_index] = (distance, collider)
# set visible false for all those that are not in the closest_sprites list # set visible false for all those that are not in the closest_sprites list
for collider in colliders: # for collider in colliders:
found = False # found = False
for sprite in sorted_dynamic_sprites: # for sprite in sorted_dynamic_sprites:
for _, c in closest_sprites[sprite]: # for _, c in closest_sprites[sprite]:
if c is collider: # if c is collider:
found = True # found = True
break # break
if found: # if found:
break # break
collider.visible = not found # collider.visible = not found
for sprite in sorted_dynamic_sprites: # for sprite in sorted_dynamic_sprites:
sprite.visible = True # sprite.visible = True
for sprite in sorted_dynamic_sprites: for sprite in sorted_dynamic_sprites:
collides_with = self.attempt_move(tick_data, collides_with = self.attempt_move(tick_data,