Ejemplo n.º 1
0
    public IEnumerator wildEncounter(EncounterTypes type)
    {
        if (setCheckBusyWith(Scene.main.Battle.gameObject))
        {
            Scene.main.Battle.gameObject.SetActive(true);

            StartCoroutine(Scene.main.Battle.control(accessedMapSettings.GetRandomEncounter(type)));

            while (Scene.main.Battle.gameObject.activeSelf)
            {
                yield return(null);
            }

            unsetCheckBusyWith(Scene.main.Battle.gameObject);
            yield return(null);
        }
    }