Removed code to set visibility of colliders and sprites, as it is no longer needed.
parent
9dfc487e9a
commit
01147960cb
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue