public IEnumerator WildBattle(PokemonPackage package) { Pokemon.Pokemon wild_pokemon = new Pokemon.Pokemon(package.species, package.level); StartCoroutine(battle_manager.WildBattle(wild_pokemon)); yield return(new WaitUntil(() => !battle_manager.in_battle)); effect_playing = false; }
public IEnumerator AddPokemon(PokemonPackage package) { Trainer player = event_manager.GetPlayerTrainer(); Pokemon.Pokemon new_pokemon = new Pokemon.Pokemon(package.species, package.level, package.form_id); player.AddPokemonToParty(new_pokemon); yield return(new WaitForSeconds(0.5f)); effect_playing = false; }