

def detectYCollisions(self, controllingEntity):
    block_hit_list = pygame.sprite.spritecollide(controllingEntity, self.entities, False)
    collisionDetected = False
    for block in block_hit_list:
        collisionDetected = True
        if (controllingEntity.deltaY > 0):
            controllingEntity.rect.bottom = block_hit_list.rect.top
            controllingEntity.deltaY = 0
        else:
            controllingEntity.rect.top = block.rect.bottom
            controllingEntity.deltaY = 0
    return collisionDetected

dataset/ETHPy150Open maximx1/PyPlatformerEngine/pyplatformerengine/physics/BasicCollisionDetection.py BasicCollisionDetection.detectYCollisions/VarMisuse@61/91 `block`->`block_hit_list`