public void Attack(int attackIndex) { Messages.AddMessage(AttackMessage(Pokemon.Attacks[attackIndex].AttackName)); if (YourPokemon) { StartCoroutine(EnemyWaitToAttack(0.5f)); } if (Pokemon.Attacks[attackIndex].AttackSound != null) { audioPlayer.clip = Pokemon.Attacks[attackIndex].AttackSound; audioPlayer.Play(); } Enemy.Damage(Pokemon.Attacks[attackIndex].AttackPower); }