private void updateBlocks(float delta) {
        for(Block b : blocks) {
            b.update(delta, blockSpeed);

            if (b.isVisible()){
                if(player.isDucked() && b.getRectangle().intersects(player.getRectangleDucking())){
                    b.onCollision(player);
                }else if(!player.isDucked() && b.getRectangle().intersects(player.getRectangleJumping())){
                    b.onCollision(player);
                }
            }
        }
    }