public void MostrarAtaque(Ataque ataquePokemon, UIAprenderNuevoAtaqueVentana controlador) { componenteControlador = controlador; ataque = ataquePokemon; if (ataque != null && ataque.ID != AtaqueID.NINGUNO) { nombre.text = ataque.nombre; elemento.text = Herramientas.TextoAtaqueElemento(ataque.ataqueElemento); poderYTipo.text = string.Concat(ataque.poder, " ", ataque.TextoTipoAtaque()); gameObject.SetActive(true); } else { gameObject.SetActive(false); } }
public void MostrarVentana(PokemonModelo pokemon, AtaqueID nuevoAtaque) { this.pokemon = pokemon; nuevoAtaqueAprender = ControladorDatos.Instancia.ObtenerAtaque(nuevoAtaque); AtaqueSeleccionado = null; nuevoAtaqueNombre.text = nuevoAtaqueAprender.nombre; nuevoAtaqueElemento.text = Herramientas.TextoAtaqueElemento(nuevoAtaqueAprender.ataqueElemento); nuevoAtaquePoderYTipo.text = string.Concat(nuevoAtaqueAprender.poder, " ", nuevoAtaqueAprender.TextoTipoAtaque()); for (int i = 0; i < detallesAtaques.Length; i++) { detallesAtaques[i].gameObject.SetActive(false); } for (int i = 0; i < pokemon.Ataques().Length; i++) { detallesAtaques[i].MostrarAtaque(pokemon.Ataques()[i].DatosFijos, this); } gameObject.SetActive(true); }