protected boolean xObstacleAhead(double time) {
        for (StaticObject so : AppFrame.getFrameDesign().getStaticObjects()) {
            if (checkXObstacle(so, time)) {
                if (obstacleReaction(so)) {
                    if (currentHorizontalSpeed > 0) {
                        this.currentCoord.setX(so.getCurrentCoordinates().getX() - this.currentWidth);
                    } else {
                        this.currentCoord.setX(so.getCurrentCoordinates().getX() + so.getLength());
                    }
                    currentHorizontalSpeed = 0;
                    heroOwnHorizontalSpeed = 0;
                    return true;
                }
            }
        }
        for (MovingObject mo : AppFrame.getFrameDesign().getMovingObjects()) {
            if (checkXObstacle(mo, time)) {
                obstacleReaction(mo);
            }
        }
        return false;
    }