public boolean checkLevelEnded() { boolean res = GameplayManager.getInstance().isLevelEnded(); if (res) { manager.alert(UIState.LEVEL_ENDED); } return res; }
public boolean checkGameOver() { boolean res = GameplayManager.getInstance().isGameOver(); if (res) { manager.alert(UIState.GAME_OVER); } return res; }
@Override public void update() { GameplayManager.getInstance().update((Player) Level.getObjects().get(0)); gameOver = checkGameOver(); levelEnded = checkLevelEnded(); checkPause(); if (pause || gameOver || levelEnded) { manager.update(); } else { level.input(); level.update(); ParticleMaster.update(camera); } }