Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 9 additions & 27 deletions src/engine/Core.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,33 +136,15 @@ public static void main(final String[] args) throws IOException {

gameState = ((GameScreen) currentScreen).getGameState();

// 게임 오버 시 ScoreScreen으로 전환
if (!gameState.getPlayerShip().isDestroyed()) {
// 다음 레벨 진행
gameState = new GameState(gameState, gameState.getGameLevel() + 1);
endTime = System.currentTimeMillis();
achievementManager.updatePlaying(
gameState.getMaxCombo(),
(int) (endTime - startTime) / 1000,
MAX_LIVES,
gameState.getPlayerShip().getPlayerHP(),
gameState.getGameLevel() - 1);
} else {
// ScoreScreen으로 전환하여 게임오버 화면 표시
currentScreen =
new ScoreScreen(
GameSettingScreen.getName(),
width,
height,
FPS,
gameState,
wallet,
achievementManager,
false);
returnCode = frame.setScreen(currentScreen);
LOGGER.info("Closing score screen.");
break;
}
// 다음 레벨 진행
gameState = new GameState(gameState, gameState.getGameLevel() + 1);
endTime = System.currentTimeMillis();
achievementManager.updatePlaying(
gameState.getMaxCombo(),
(int) (endTime - startTime) / 1000,
MAX_LIVES,
gameState.getPlayerShip().getPlayerHP(),
gameState.getGameLevel() - 1);
} while (!gameState.getPlayerShip().isDestroyed());

if (isGotoMainMenu) {
Expand Down