Esempio n. 1
0
    public IEnumerator EncounterEnd(Factions faction)
    {
        Initiative.queuedActions++;
        staticEncounterPanel.SetActive(true);
        staticEncounterEndtext.text = (faction + " are victorious!");
        RostaInfo.encounter         = false;
        yield return(new WaitForSeconds(3f));

        RostaInfo.currentEncounter.selectedCompany.units.Clear();
        foreach (GameObject unit in playerSquad)
        {
            if (unit != null)
            {
                UnitInfo info = unit.GetComponent <Unit>().unitInfo;
                RostaInfo.currentEncounter.selectedCompany.units.Add(info);
            }
        }
        Initiative.ResetStatics();
        SceneManager.LoadScene("Map");
        yield break;
    }