예제 #1
0
 /// <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");
 }
예제 #2
0
    /***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;
    }
예제 #3
0
    /// <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");
        }
    }