protected boolean yObstacleAhead(double time) {
        final int halfOfWidth = this.currentWidth / 2;
        for (StaticObject so : AppFrame.getFrameDesign().getStaticObjects()) {
            if (checkYObstacle(so, time, halfOfWidth)) {
                if (obstacleReaction(so)) {
                    currentVerticalSpeed = 0;
                    return true;
                }
                //return true;
            }
        }
        for (MovingObject mo : AppFrame.getFrameDesign().getMovingObjects()) {
            if (checkYObstacle(mo, time, halfOfWidth)) {
                obstacleReaction(mo);
            }
        }
        return false;
    }