// 스테이지를 통과 시 실행 public void FinishStage() { isGameOver = true; if (currentStageSlot != null) { UIManager.instance.SetFinishUI(); if (isGoal) { //여기에서 오류 발생하는것같다 //현재 점수가 현재 스테이지에서 달성한 최대 점수보다 크다면 최대 점수 변경 if (score > currentStageSlot.bestScore) { currentStageSlot.starCount = UIManager.instance.starCount; currentStageSlot.StarImageChange(); currentStageSlot.bestScore = score; theSaveLoad.SaveData(); } } } else { UIManager.instance.SetFinishUI(); if (currentBossStageSlot.starCount < UIManager.instance.starCount) { currentBossStageSlot.starCount = UIManager.instance.starCount; } currentBossStageSlot.StarImageChange(); currentBossStageSlot.challengeCount = 0; } }
// 스테이지를 통과 시 실행 public void FinishStage() { isGameOver = true; if (currentStageSlot != null) { UIManager.instance.SetFinishUI(); if (isGoal) { //여기에서 오류 발생하는것같다 //현재 점수가 현재 스테이지에서 달성한 최대 점수보다 크다면 최대 점수 변경 if (score > currentStageSlot.bestScore && UIManager.instance.starCount > 0) { currentStageSlot.starCount = UIManager.instance.starCount; currentStageSlot.StarImageChange(); currentStageSlot.bestScore = score; beforeChapterUnlock = UIManager.instance.chapterSelectUI.chapterUnlock; ChapterOpenCheck(); theSaveLoad.SaveData(); } } } //보스 스테이지면 else { UIManager.instance.SetFinishUI(); if (currentBossStageSlot.bossStageStatus == BossStageSlot.BossStageStatus.Clear && currentBossStageSlot.starCount <= UIManager.instance.starCount) { currentBossStageSlot.starCount = UIManager.instance.starCount; beforeChapterUnlock = UIManager.instance.chapterSelectUI.chapterUnlock; ChapterOpenCheck(); if (currentBossStageSlot.bossStageType != BossStageSlot.BossStageType.BounceAttack) { if (currentBossStageSlot.minPanaltyPoint > panaltyPoint) { currentBossStageSlot.minPanaltyPoint = panaltyPoint; } } theSaveLoad.SaveData(); } else if (currentBossStageSlot.starCount == UIManager.instance.starCount && currentBossStageSlot.bossStageType != BossStageSlot.BossStageType.BounceAttack) { if (currentBossStageSlot.minPanaltyPoint > panaltyPoint) { currentBossStageSlot.minPanaltyPoint = panaltyPoint; theSaveLoad.SaveData(); } } currentBossStageSlot.StarImageChange(); panaltyPoint = 0; } }