public void MostrarDetallesPokemon(PokemonModelo pokemonDatos) { gameObject.SetActive(true); UIControlador.Instancia.DetallesPokemon.imagen.sprite = pokemonDatos.DatosFijos.sprite; UIControlador.Instancia.DetallesPokemon.nombre.text = pokemonDatos.DatosFijos.nombre; string ele = string.Empty; if (pokemonDatos.DatosFijos.tipoElemento1 != Elemento.NINGUNO) { ele = Herramientas.TextoAtaqueElemento(pokemonDatos.DatosFijos.tipoElemento1); } if (pokemonDatos.DatosFijos.tipoElemento2 != Elemento.NINGUNO) { ele = string.Concat(ele, " ", Herramientas.TextoAtaqueElemento(pokemonDatos.DatosFijos.tipoElemento2)); } UIControlador.Instancia.DetallesPokemon.elementos.text = ele; UIControlador.Instancia.DetallesPokemon.ataques1.MostrarAtaque(pokemonDatos.Ataques()[0], pokemonDatos); UIControlador.Instancia.DetallesPokemon.ataques2.MostrarAtaque(pokemonDatos.Ataques()[1], pokemonDatos); UIControlador.Instancia.DetallesPokemon.ataques3.MostrarAtaque(pokemonDatos.Ataques()[2], pokemonDatos); UIControlador.Instancia.DetallesPokemon.ataques4.MostrarAtaque(pokemonDatos.Ataques()[3], pokemonDatos); UIControlador.Instancia.DetallesPokemon.salud.text = pokemonDatos.EstadisticaSaludMaxima().ToString(); UIControlador.Instancia.DetallesPokemon.ataqueFisico.text = pokemonDatos.EstadisticaAtaqueFisico().ToString(); UIControlador.Instancia.DetallesPokemon.defensaFisica.text = pokemonDatos.EstadisticaDefensaFisica().ToString(); UIControlador.Instancia.DetallesPokemon.ataqueMagico.text = pokemonDatos.EstadisticaAtaqueMagico().ToString(); UIControlador.Instancia.DetallesPokemon.defensaMagica.text = pokemonDatos.EstadisticaDefensaMagica().ToString(); UIControlador.Instancia.DetallesPokemon.velocidad.text = pokemonDatos.EstadisticaVelocidad().ToString(); }
public void MostrarAtaque(AtaquesModelo ataque, PokemonModelo pokemon) { if (ataque == null || ataque.ID == AtaqueID.NINGUNO || pokemon == null) { gameObject.SetActive(false); } else { nombre.text = pokemon.Ataque(ataque.ID).DatosFijos.nombre; elemento.text = Herramientas.TextoAtaqueElemento(pokemon.Ataque(ataque.ID).DatosFijos.ataqueElemento); pp.text = pokemon.Ataque(ataque.ID).TextoPPActualYMaximo(); poderYTipo.text = string.Concat(pokemon.Ataque(ataque.ID).DatosFijos.poder, " ", pokemon.Ataque(ataque.ID).DatosFijos.TextoTipoAtaque()); gameObject.SetActive(true); } }
public void MostrarDatosAtaque(AtaquesModelo ataque) { if (ataque == null || ataque.ID == AtaqueID.NINGUNO) { gameObject.SetActive(false); } else { nombre.text = ataque.DatosFijos.nombre; pp.text = ataque.TextoPPActualYMaximo(); elemento.text = Herramientas.TextoAtaqueElemento(ataque.DatosFijos.ataqueElemento); poder.text = ataque.DatosFijos.poder.ToString(); ataqueID = ataque.ID; gameObject.SetActive(true); } }
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); }
public void MostrarPokemonPokedex(PokemonID id, PokedexTipoAvistamiento tipoAvistamiento) { Pokemon p = ControladorDatos.Instancia.ObtenerPokemon(id); imagen.sprite = p.sprite; switch (tipoAvistamiento) { //case PokedexTipoAvistamiento.NINGUNO: // imagen.color = Color.black; // nombre.text = Ajustes.Instancia.PokedexNombrePokemonCuandoNoLoHavistoNiCapturado; // elementos.text = Ajustes.Instancia.PokedexNombrePokemonCuandoNoLoHavistoNiCapturado; // descripcion.text = string.Empty; // break; case PokedexTipoAvistamiento.Visto: imagen.color = Color.white; nombre.text = p.nombre; elementos.text = Ajustes.Instancia.PokedexNombrePokemonCuandoNoLoHavistoNiCapturado; descripcion.text = string.Empty; break; case PokedexTipoAvistamiento.Capturado: imagen.color = Color.white; nombre.text = p.nombre; string elementosTexto = string.Empty; if (p.tipoElemento1 != Elemento.NINGUNO) { elementosTexto = string.Concat(Herramientas.TextoAtaqueElemento(p.tipoElemento1), "\n"); } if (p.tipoElemento2 != Elemento.NINGUNO) { elementosTexto = string.Concat(elementosTexto, Herramientas.TextoAtaqueElemento(p.tipoElemento2)); } elementos.text = elementosTexto; descripcion.text = p.descripcion; break; } gameObject.SetActive(true); }