public IEnumerator SetUpBattle() { playerUnit.Setup(playerParty.GetHealthyPokemon()); enemyUnit.Setup(wildPokemon); playerHud.SetData(playerUnit.Pokemon); enemyHud.SetData(enemyUnit.Pokemon); dialogBox.SetMoveNames(playerUnit.Pokemon.Moves); yield return(StartCoroutine(dialogBox.TypeDialog($"A wild {enemyUnit.Pokemon.Base.Name} appeared."))); playerAction(); }
private IEnumerator SetupBattle() { playerUnit.Setup(playerParty.GetHealthyPokemon()); enemyUnit.Setup(wildPokemon); playerHud.SetData(playerUnit.Pokemon); enemyHud.SetData(enemyUnit.Pokemon); dialogBox.SetMoveNames(playerUnit.Pokemon.Moves); yield return(StartCoroutine(dialogBox.TypeDialog($"Un {enemyUnit.Pokemon.Base.Name} salvaje aparecio."))); yield return(new WaitForSeconds(1f)); PlayerMove(); }
public IEnumerator SetupBattle() { // Wait For Battle Transition FindObjectOfType <AudioManager>().Stop("VoidSong"); FindObjectOfType <AudioManager>().Play("BattleSong"); yield return(new WaitForSeconds(1.7f)); // Lower Volume To Hear Sound Effects FindObjectOfType <AudioManager>().LowerVolume("BattleSong"); playerUnit.Setup(); enemyUnit.Setup(); playerHud.SetData(playerUnit.Monster); enemyHud.SetData(enemyUnit.Monster); dialogBox.SetMoveNames(playerUnit.Monster.Moves); yield return(dialogBox.TypeDialog("Mirashi challenged you!")); yield return(new WaitForSeconds(1.5f)); yield return(dialogBox.TypeDialog("*You draw a card*")); yield return(new WaitForSeconds(1.5f)); PlayerAction(); }
private IEnumerator SetupBattle() { playerUnit.Setup(); playerUnit.SetSprite(pokemonCount); enemyUnit.Setup(); playerUnit.SetSprite(enemyCount); playerHud.SetData(playerUnit.PokemonList[pokemonCount]); enemyHud.SetData(enemyUnit.PokemonList[enemyCount]); dialogBox.SetMoveNames(playerUnit.PokemonList[pokemonCount].Moves); yield return(StartCoroutine(dialogBox.TypeDialog($"Un {enemyUnit.PokemonList[enemyCount].Base.Name} salvaje aparecio."))); yield return(new WaitForSeconds(1f)); PlayerMove(); }
//Lance les fonctions de la bataille public IEnumerator SetupBattle() { //Configure le playerUnit et l'enemyUnit playerUnit.Setup(playerParty.GetHealthyPokemon()); enemyUnit.Setup(wildPokemon); //Définit les données du playerHud et de l'enemyHud playerHud.SetData(playerUnit.Pokemon); enemyHud.SetData(enemyUnit.Pokemon); partyScreen.Init(); //Affiche les moves des pokemons du joueur dialogBox.SetMoveNames(playerUnit.Pokemon.Moves); //Stop la coroutine et affiche une phrase yield return(dialogBox.TypeDialog($"A wild {enemyUnit.Pokemon.Base.Name} appeared.")); PlayerAction(); }
public IEnumerator SetupBattle() { // el método setup de una playerunit sirve para que se carguen sus atributos, sus sprites, etc. playerU.Setup(playerTeam.GetAlivePokemon()); // Llamamos a la funcion GetAlivePokemon para que el player inicie la batalla con el primer pokemon vivo que tenga enemyU.Setup(enemyP); playerH.SetData(playerU.pkmn); enemyH.SetData(enemyU.pkmn); teamScreen.Init(); dialogB.SetMoveNames(playerU.pkmn.Moves); // escribir en la dialog box los movimientos existentes para el pokemon que tenemos // uso de yield return detiene ejecución de función actual y corre por completo la función indicada en return yield return(dialogB.TD($"A wild {enemyU.pkmn.pBase.GetPName} appeared")); yield return(new WaitForSeconds(1f)); // hardcodeamos 1 segundo para dar tiempo de lectura // resumimos ejecución de SetupBattle PlayerAction(); }
/// <summary> /// Setup function to prepare the monster in the battle screen. /// </summary> /// <param name="monster">Monster to setup.</param> public void Setup(MonsterObj monster) { Monster = monster; _image.sprite = _isPlayerMonster ? Monster.Base.LeftSprite : Monster.Base.RightSprite; _hud.gameObject.SetActive(true); _hud.SetData(monster); _image.color = _originalColor; transform.localScale = new Vector3(1, 1, 1); PlayBattleStartAnimation(); }
public IEnumerator SetupBattle() { PlayerUnit.Setup(grupo.GetSaeraHealth()); SaeraHud.SetData(PlayerUnit.saera); EnemyUnit.Setup(worldEnemy); EnemyHud.SetData(EnemyUnit.enemy); yield return(dialogBox.TypeDialog($"¡Cuidado! {EnemyUnit.enemy.Base.Name} te corta el paso")); yield return(new WaitForSeconds(1.5f)); Action(); }
public IEnumerator SetupBattle() { playerUnit.Setup(Player.instance.pokemonBase); enemy.enemyUnit.Setup(Enemy.instance.pokemonBase); playerHud.SetData(playerUnit.Pokemon); enemyHud.SetData(enemy.enemyUnit.Pokemon); dialogBox.SetMoveNames(playerUnit.Pokemon.Moves); yield return(dialogBox.TypeDialog($"??? sents out {enemy.enemyUnit.Pokemon.Base.Name}.")); PlayerAction(); }
public IEnumerator SetupBattle() { playerUnit.Setup(); playerHud.SetData(playerUnit.pokemon); enemyUnit.Setup(); enemyHud.SetData(enemyUnit.pokemon); dialogBox.SetMoveNames(playerUnit.pokemon.Moves); yield return(dialogBox.TypeDialog($"A wild {enemyUnit.pokemon.Base.Name} appeared.")); PlayerAction(); }
public void StartBattle() { //Set up player playerUnit.Setup(); playerHud.SetData(playerUnit.Pokemon); //Set up opponent var baseMon = PokemonBase.ReadBaseMonString(BattleData.pokemonName); enemyUnit.Pokemon = new Pokemon(baseMon, BattleData.Lvl); enemyUnit.Pokemon.HP = BattleData.hp; enemyUnit.Setup(); enemyHud.SetData(enemyUnit.Pokemon); StartCoroutine(SetupBattle()); }
public void Setup(Pokemon pokemon) { Pokemon = pokemon; image.sprite = Pokemon.Base.Sprite; //GetComponent<Animation>().animateOnlyIfVisible = Pokemon.Base.Anim; /*if(isPlayerUnit) * { * GetComponent<Image>().sprite * }*/ hud.gameObject.SetActive(true); hud.SetData(pokemon); transform.localScale = new Vector3(1, 1, 1); image.color = originalColor; PlayEnterAnimation(); }
//We will know wich pokemon we should choose to show, and if we need it's back or front sprite public void Setup(Pokemon pokemon) //Parameter is a Pokemon pokemon function, to know it's base and level { Pokemon = pokemon; if (isPlayerUnit) { image.sprite = Pokemon.Base.BackSprite; } else { image.sprite = Pokemon.Base.FrontSprite; } hud.gameObject.SetActive(true); hud.SetData(pokemon); transform.localScale = new Vector3(1, 1, 1); image.color = originalColor; PlayEnterAnimation(); }
// sets up what pices are being used public void SetUp(Piece piece) { Piece = piece; if (isPlayerUnit) { image.sprite = Piece.Base.BackSpriten; } else { image.sprite = Piece.Base.FrontSprite; } hud.gameObject.SetActive(true); hud.SetData(piece); PlayEnterAnimation(); //eps 12 timestamp 12:50 image.color = originalColor; }
// Method that sets up the player and trainer battlescene public void SetUp(bool isPlayerUnit) { image.enabled = false; image.enabled = true; Monster = new Monster(_base); if (isPlayerUnit) { Debug.Log("back sprite"); image.sprite = Monster.Base.BackSprite; } else { image.sprite = Monster.Base.FrontSprite; } image.color = originalColor; hud.SetData(Monster, isPlayerUnit); PlayerEnterAnimation(); }
public void Setup(Pokemon pokemon) { _Pokemon = pokemon; if (!isPlayerUnit) { _Pokemon.Init(); } hud.SetData(_Pokemon); print(_Pokemon.Base.Name + " - " + _Pokemon.HP + " / " + _Pokemon.MaxHP); pokemonImage.sprite = isPlayerUnit ? _Pokemon.Base.BackSprite : _Pokemon.Base.FrontSprite; pokemonImage.color = originalColor; if (!isPlayerUnit) { _Pokemon.ResetPP(); } PlayerEnterAnimation(); }
public void Setup(Creature creature) { Creature = creature; if (isPlayerUnit) { image.sprite = Creature.Base.BackSprite; } else { image.sprite = Creature.Base.FrontSprite; } //enable hud that was diabled during Clear (for trainers) hud.gameObject.SetActive(true); //ssetting up the hud for both creatures hud.SetData(creature); //the scale gets really small when we try to catch the creature, reset it here transform.localScale = new Vector3(1, 1, 1); image.color = originalColor; BattleEnterAnimation(); }
public IEnumerator SetupBattle() { List <BattleUnit> enemyUnits = new List <BattleUnit>(); enemyUnits.Add(enemyUnit); if (enemyUnit2 != null) { enemyUnits.Add(enemyUnit2); } playerUnit.Setup(); enemyUnit.Setup(); playerHud.SetData(playerUnit.Pokemon); enemyHud.SetData(enemyUnit.Pokemon); if (enemyUnit2 && enemyHud2) { enemyUnit2.Setup(); enemyHud2.SetData(enemyUnit2.Pokemon); } dialogBox.SetMovesNames(playerUnit.Pokemon.Moves); if (enemyUnit2) { dialogBox.SetEnemyNames(enemyUnits); } if (enemyUnit2) { yield return(dialogBox.TypeDialog($"A rotten {enemyUnit.Pokemon.Base.Name} & {enemyUnit2.Pokemon.Base.Name} appeared.")); } else { yield return(dialogBox.TypeDialog($"A rotten {enemyUnit.Pokemon.Base.Name} appeared.")); } ActionSelection(); }