From 01147960cb7a747f968df573b6e0562a57dedafb Mon Sep 17 00:00:00 2001 From: Yan Wittmann Date: Tue, 28 Mar 2023 19:39:26 +0200 Subject: [PATCH] Removed code to set visibility of colliders and sprites, as it is no longer needed. --- project/physics/PhysicsElementsHandler.py | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/project/physics/PhysicsElementsHandler.py b/project/physics/PhysicsElementsHandler.py index 42f409d..42a176f 100644 --- a/project/physics/PhysicsElementsHandler.py +++ b/project/physics/PhysicsElementsHandler.py @@ -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,