Ejemplo n.º 1
0
 private void OnEnable()
 {
     tipoAvistamiento = ControladorDatos.Instancia.Datos.Pokedex(pokemon);
     if (tipoAvistamiento == PokedexTipoAvistamiento.NINGUNO)
     {
         nombre.text = Ajustes.Instancia.PokedexNombrePokemonCuandoNoLoHavistoNiCapturado;
         iconoEstado.gameObject.SetActive(false);
     }
 }
Ejemplo n.º 2
0
    public PokedexTipoAvistamiento Pokedex(PokemonID id)
    {
        PokedexTipoAvistamiento tipo = PokedexTipoAvistamiento.NINGUNO;

        if (_pokedex.ContieneClave(id))
        {
            _pokedex.IntentarObtenerValor(id, out tipo);
        }
        return(tipo);
    }
Ejemplo n.º 3
0
    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);
    }