public void updateGame(double time) {
        if (getHero().getPlayerLose()) {
            updatesBeforeLoseMade++;
            if (updatesBeforeLoseMade > UPDATES_BEFORE_LOSE_SCREEN) {
                isRunning = false;

            }
        }
        for (MovingObject unit : LevelDesign.getFrameDesigns().get(currentFrameNumber).getMovingObjects()) {
            unit.move(time);
        }
        for (StaticObject item : LevelDesign.getFrameDesigns().get(currentFrameNumber).getStaticObjects()) {
            item.update();
        }
        for (StaticObject decoration : LevelDesign.getFrameDesigns().get(currentFrameNumber).getDecorations()) {
            decoration.update();
        }

        for (MovingObject obj : LevelDesign.getFrameDesigns().get(currentFrameNumber).getMovingObjectsForRemove()) {
            LevelDesign.getFrameDesigns().get(currentFrameNumber).getMovingObjects().remove(obj);
        }
        for (StaticObject obj : LevelDesign.getFrameDesigns().get(currentFrameNumber).getStaticObjectsForRemove()) {
            LevelDesign.getFrameDesigns().get(currentFrameNumber).getStaticObjects().remove(obj);
        }
        LevelDesign.getHero().move(time);
    }