public void updateState() {
		updatePause();
		
		if (!isPaused) {
			if (level.isFinished()) {
				if (level.isVictorious()) {
					if (!lg.hasMoreLevels()) {
						SwingUtilities.invokeLater(new Runnable() {
							public void run() {
								controller.setVictoryScreen();
							}
						});
					} else {
					    SwingUtilities.invokeLater(new Runnable() {
                            public void run() {
                                controller.setLevelCompleteScreen(lg.levelNumber());
                            }
                        });
						setNextLevel();
						
					}
				} else {
					numLives--;
					if (numLives <= 0) {
						SwingUtilities.invokeLater(new Runnable() {
							public void run() {
								controller.setGameOverScreen();
							}
						});
						resetGame();
						setNextLevel();
					} else {
						level.resetProtagonist();
					}
				}
			} else {
				level.update();
			}
		}
	}