public void update() {
        currentLevel.update();
        if (currentLevel.levelchange) {
            Level oldlevel = currentLevel;
            currentLevel = levels.get(oldlevel.changeto);
            oldlevel.levelChanged();

        }
    }