public void GameOver() { if (marysHealth <= 0 || enemyHealth <= 0) { gameOver.SetActive(true); if (marysHealth <= 0 && enemyHealth <= 0) { SoundManager.Instance.LoseStateSound(); GameObject.Find("IngameGUI_Canvas/GameOver/Text").GetComponent <Text>().text = "Everyone Lose!"; rewardScreen.NewReward(6); dialogueTrigger.EnemyStalemate(); dialogueTrigger.MaryStalemate(); } else if (marysHealth <= 0) { dialogueTrigger.EnemyWins(); dialogueTrigger.MaryLoss(); enemyAnimations.animator.SetBool("WinState", true); SoundManager.Instance.LoseStateSound(); GameObject.Find("IngameGUI_Canvas/GameOver/Text").GetComponent <Text>().text = "Mary Lost!"; rewardScreen.NewReward(6); } else if (enemyHealth <= 0) { dialogueTrigger.EnemyLoses(); dialogueTrigger.MaryWin(); characterAnimations.animator.SetBool("WinState", true); SoundManager.Instance.WinStateSound(); GameObject.Find("IngameGUI_Canvas/GameOver/Text").GetComponent <Text>().text = "Mary Wins!"; if (DataAcrossScenes.EnemyChosenStaff == (int)Chosen_Staff.pumpkin) { if (DataAcrossScenes.pumpkinStaffUnlocked == false) { rewardScreen.NewReward(0); DataAcrossScenes.pumpkinStaffUnlocked = true; DataAcrossScenes.seniorBonesUnlocked = true; DataAcrossScenes.ChosenEnemy += 1; } else if (DataAcrossScenes.pumpkinStaffUnlocked == true) { rewardScreen.NewReward(5); } } if (DataAcrossScenes.EnemyChosenStaff == (int)Chosen_Staff.skeleton) { if (DataAcrossScenes.skeletonStaffUnlocked == false) { rewardScreen.NewReward(1); DataAcrossScenes.skeletonStaffUnlocked = true; DataAcrossScenes.umbralinaUnlocked = true; DataAcrossScenes.ChosenEnemy += 1; } else if (DataAcrossScenes.skeletonStaffUnlocked == true) { rewardScreen.NewReward(5); } } if (DataAcrossScenes.EnemyChosenStaff == (int)Chosen_Staff.moon) { if (DataAcrossScenes.moonStaffUnlocked == false) { rewardScreen.NewReward(2); DataAcrossScenes.moonStaffUnlocked = true; DataAcrossScenes.countUnlocked = true; DataAcrossScenes.ChosenEnemy += 1; } else if (DataAcrossScenes.moonStaffUnlocked == true) { rewardScreen.NewReward(5); } } if (DataAcrossScenes.EnemyChosenStaff == (int)Chosen_Staff.night) { if (DataAcrossScenes.darkNightStaffUnlocked == false) { DataAcrossScenes.ChosenEnemy = 0; rewardScreen.NewReward(3); DataAcrossScenes.darkNightStaffUnlocked = true; DataAcrossScenes.luciferUnlocked = true; } else if (DataAcrossScenes.darkNightStaffUnlocked == true) { rewardScreen.NewReward(5); } } if (DataAcrossScenes.EnemyChosenStaff == (int)Chosen_Staff.hell) { if (DataAcrossScenes.hellStaffUnlocked == false) { DataAcrossScenes.ChosenEnemy = 1; rewardScreen.NewReward(7); DataAcrossScenes.hellStaffUnlocked = true; } else if (DataAcrossScenes.hellStaffUnlocked == true) { rewardScreen.NewReward(5); } } } pauseMode = true; } }