// Method that changes camera view from the map to the battlescene. public IEnumerator StartBattle(BattleUnit trainerUnit) { state = GameState.Battle; AudioManager.Instance.PlayMusic(BattleMusic); battleLoader.FadetoBlack(); yield return(new WaitForSeconds(1f)); BattleSystem.Instance.gameObject.SetActive(true); battleLoader.UnFade(); worldCamera.gameObject.SetActive(false); BattleSystem.Instance.StartBattle(trainerUnit); }
// Method for Quit public void Quit() { // Play fade to black animation battleLoader.FadetoBlack(); // Quit the application Application.Quit(); }