/// <summary> /// Load the overworld back in after the end of a battle /// </summary> public void LoadOverworld() { ow.activeEnemies.Remove(ea); Destroy(ea.gameObject); ow.Activate(true); SceneManager.LoadScene("overworld"); }
/***MAIN METHODS***/ protected override void Awake() { base.Awake(); ow = FindObjectOfType <Overworld>(); ow.Activate(false); board.BoardInit(ow.encounteredParty.bi); //Number of PCs allowed in battle numPartyMembers = ow.encounteredParty.bi.playerCoordinates.Length; }
/// <summary> /// End battle and return to overworld once all enemies are defeated /// </summary> public void CheckVictory() { List <Entity> partyMembers = eParty.GetLivingParty(); if (partyMembers.Count == 0) { //Revive overworld ow.activeEnemies.Remove(ea); Destroy(ea.gameObject); ow.Activate(true); SceneManager.LoadScene("overworld"); } }