Minor performance improvement

main
Yan Wittmann 2023-03-27 14:47:12 +02:00
parent f400b374fd
commit 5db9b7c627
1 changed files with 2 additions and 0 deletions

View File

@ -163,5 +163,7 @@ class PhysicsElementsHandler:
if sprite is not collider:
if sprite.collides_with(collider, TOLERANCE):
collides_with.append(collider)
if len(collides_with) >= 2:
break
return collides_with