// Method to signal the end of the battle and setting the battle scene to false. public void EndBattle(bool won) { state = PVPState.End; BattleSystem.Instance.gameObject.SetActive(false); }
// Changing of scene to the PVP battle scene. public void StartBattle(BattleUnit trainerUnit) { state = PVPState.Battle; BattleSystem.Instance.gameObject.SetActive(true); BattleSystem.Instance.StartBattle(trainerUnit); }