Exemplo n.º 1
0
    public void SetCarpetaEspecial()
    {
        inputfield.gameObject.SetActive(false);
        botonBorrar.SetActive(false);
        TextLanguage _txtLanguage = nombreCarpetaText.gameObject.AddComponent <TextLanguage>();

        _txtLanguage.SetText("SIN CARPETA", AppController.Idiomas.Español);
        _txtLanguage.SetText("WITHOUT FOLDER", AppController.Idiomas.Ingles);
    }
Exemplo n.º 2
0
    public void SetName(string name_, string inicial_, AppController.Idiomas idioma = AppController.Idiomas.Español)
    {
        /*GetComponentInChildren<Text>().text = name_;
         * gameObject.name = name_;
         * inicialText.text = inicial_;*/

        nombreEstadistica.SetText(name_, idioma);
        inicialEstadistica.SetText(inicial_, idioma);
    }
Exemplo n.º 3
0
    public void SetMenu(List <string> opcionesEspañol, List <string> opcionesIngles, string nombreCategoria_, InputPrefabEspecial input)
    {
        Debug.Log("OPCIONES: " + opcionesEspañol.Count);
        CanvasController.instance.retrocesoPausado = true;

        for (int i = 0; i < opcionesEspañol.Count; i++)
        {
            GameObject go = Instantiate(opcionPrefab, parentTransformOpciones, false);
            go.SetActive(true);
            TextLanguage textLanguage = go.GetComponentInChildren <TextLanguage>();
            textLanguage.SetText(opcionesEspañol[i], AppController.Idiomas.Español);
            textLanguage.SetText(opcionesIngles[i], AppController.Idiomas.Ingles);
        }

        nombreCategoria.text = nombreCategoria_;

        inputEspecial = input;
    }
Exemplo n.º 4
0
    public void SetPanelPlanilla(BotonHistorialAsistencia botonFocus_)
    {
        CanvasController.instance.retrocesoPausado = false;

        newDetalles = new List <DetalleAsistencia>();

        botonFocus = botonFocus_;

        detalles = AppController.instance.equipoActual.GetPlanillaWithName(botonFocus.GetNombre()).GetDetalles();

        CanvasController.instance.overlayPanel.SetNombrePanel("PLANILLA DE ASISTENCIA", AppController.Idiomas.Español);
        CanvasController.instance.overlayPanel.SetNombrePanel("ASSISTANCE FORM", AppController.Idiomas.Ingles);

        CrearPrefabs(detalles, false);

        //Si no tiene alias lo desactivo
        aliasText.gameObject.SetActive(true);
        if (botonFocus_.GetAlias() == "")
        {
            aliasText.gameObject.SetActive(false);
        }

        base.SetPanelAsistencia();

        fechaText.SetText("FECHA:\n" + botonFocus_.GetFecha(), AppController.Idiomas.Español);
        fechaText.SetText("DATE:\n" + botonFocus_.GetFecha(), AppController.Idiomas.Ingles);

        aliasText.SetText("ALIAS:\n" + botonFocus_.GetAlias(), AppController.Idiomas.Español);
        aliasText.SetText("ALIAS:\n" + botonFocus_.GetAlias(), AppController.Idiomas.Ingles);

        inputNuevoAlias.text = "";

        //Estado incial de los botones
        botonBorrar.SetActive(true);
        botonEditar.SetActive(true);
        botonGuardar.SetActive(false);
        inputNuevoAlias.gameObject.SetActive(false);
    }
Exemplo n.º 5
0
    public void SetPanelAsistencia()
    {
        //Setear la info de la asistencia
        nombreEquipoText.SetText("EQUIPO:\n" + AppController.instance.equipoActual.GetNombre(), AppController.Idiomas.Español);
        nombreEquipoText.SetText("TEAM:\n" + AppController.instance.equipoActual.GetNombre(), AppController.Idiomas.Ingles);

        placeholderNuevoAlias.SetText("ALIAS (OPCIONAL)", AppController.Idiomas.Español);
        placeholderNuevoAlias.SetText("ALIAS (OPTIONAL)", AppController.Idiomas.Ingles);

        leyendaInicialPresente.SetText("P", AppController.Idiomas.Español);
        leyendaInicialPresente.SetText("P", AppController.Idiomas.Ingles);
        leyendaPresente.SetText("PRESENTE", AppController.Idiomas.Español);
        leyendaPresente.SetText("PRESENT", AppController.Idiomas.Ingles);

        leyendaInicialTarde.SetText("T", AppController.Idiomas.Español);
        leyendaInicialTarde.SetText("L", AppController.Idiomas.Ingles);
        leyendaTarde.SetText("TARDE", AppController.Idiomas.Español);
        leyendaTarde.SetText("LATE", AppController.Idiomas.Ingles);

        leyendaInicialAusente.SetText("A", AppController.Idiomas.Español);
        leyendaInicialAusente.SetText("A", AppController.Idiomas.Ingles);
        leyendaAusente.SetText("AUSENTE", AppController.Idiomas.Español);
        leyendaAusente.SetText("ABSCENT", AppController.Idiomas.Ingles);
    }
Exemplo n.º 6
0
    public void SetMenu(List <string> opciones, string categoria, AppController.Idiomas idioma)
    {
        CanvasController.instance.retrocesoPausado = true;

        for (int i = 0; i < opciones.Count; i++)
        {
            GameObject go = Instantiate(opcionPrefab, parentTransformOpciones, false);
            go.SetActive(true);
            TextLanguage textLanguage = go.GetComponentInChildren <TextLanguage>();
            textLanguage.SetText(opciones[i], idioma);
        }

        nombreCategoria.text = categoria;

        CanvasController.instance.botonDespliegueMenu.SetActive(false);
    }
Exemplo n.º 7
0
    private void SetBotonAsistencia()
    {
        Image imagen = botonCambiarAsistencia.GetComponent <Image>();

        if (asistencia == 0)
        {
            imagen.color = colorPresente;
            textBotonAsistencia.SetText("P", AppController.Idiomas.Español);
            textBotonAsistencia.SetText("P", AppController.Idiomas.Ingles);
        }
        else if (asistencia == 1)
        {
            imagen.color = colorTarde;
            textBotonAsistencia.SetText("T", AppController.Idiomas.Español);
            textBotonAsistencia.SetText("L", AppController.Idiomas.Ingles);
        }
        else
        {
            imagen.color = colorAusente;
            textBotonAsistencia.SetText("A", AppController.Idiomas.Español);
            textBotonAsistencia.SetText("A", AppController.Idiomas.Ingles);
        }
    }
Exemplo n.º 8
0
 public void SetCantidadResultados(int cantResultados)
 {
     cantidadResultadosText.gameObject.SetActive(true);
     cantidadResultadosText.SetText(cantResultados + " resultado/s encontrado/s".ToUpper(), AppController.Idiomas.Español);
     cantidadResultadosText.SetText(cantResultados + " result/s found".ToUpper(), AppController.Idiomas.Ingles);
 }
Exemplo n.º 9
0
 public void SetText(string text_, AppController.Idiomas idioma)
 {
     mensajeText.SetText(text_, idioma);
 }
Exemplo n.º 10
0
    public void SetDetallesJugador(Partido _partido, string nombreJugador, Estadisticas _estadisticas)
    {
        partidoFocus = _partido;
        ResultadoEntradaDatos.Resultado _tipoResultado;

        if (_partido != null)
        {
            if (partidoFocus.GetTipoResultadoPartido() == Partido.TipoResultadoPartido.Normal)
            {
                resultadoSets.gameObject.SetActive(false);
                resultadoNormal.gameObject.SetActive(true);

                ResultadoNormal _res = (ResultadoNormal)partidoFocus.GetResultadoEntradaDato();

                resultadoNormal.CopyDataFrom(_res);
                resultadoNormal.DisableEdition();
                _tipoResultado = resultadoNormal.GetResultado();
            }
            else
            {
                resultadoSets.gameObject.SetActive(true);
                resultadoNormal.gameObject.SetActive(false);

                ResultadoSets    _res   = (ResultadoSets)partidoFocus.GetResultadoEntradaDato();
                List <SetPrefab> _lista = _res.GetListaSets();

                resultadoSets.BorrarPrefabs();
                foreach (var set in _lista)
                {
                    resultadoSets.AgregarSet(set);
                }
                resultadoSets.DisableEdition();
                _tipoResultado = resultadoSets.GetResultado();
            }

            if (_tipoResultado == ResultadoEntradaDatos.Resultado.Victoria)
            {
                resultadoText.SetText("Victoria", AppController.Idiomas.Español);
                resultadoText.SetText("Victory", AppController.Idiomas.Ingles);
            }
            else if (_tipoResultado == ResultadoEntradaDatos.Resultado.Derrota)
            {
                resultadoText.SetText("Derrota", AppController.Idiomas.Español);
                resultadoText.SetText("Loss", AppController.Idiomas.Ingles);
            }
            else
            {
                resultadoText.SetText("Empate", AppController.Idiomas.Español);
                resultadoText.SetText("Tie", AppController.Idiomas.Ingles);
            }

            if (isPartido)
            {
                CanvasController.instance.overlayPanel.SetNombrePanel("PARTIDO: " + partidoFocus.GetNombre(), AppController.Idiomas.Español);
                CanvasController.instance.overlayPanel.SetNombrePanel("MATCH: " + partidoFocus.GetNombre(), AppController.Idiomas.Ingles);
            }
            else
            {
                CanvasController.instance.overlayPanel.SetNombrePanel("PRACTICA: " + partidoFocus.GetNombre(), AppController.Idiomas.Español);
                CanvasController.instance.overlayPanel.SetNombrePanel("PRACTICE: " + partidoFocus.GetNombre(), AppController.Idiomas.Ingles);
            }
        }

        if (_partido == null)
        {
            botonVerResumen.SetActive(false);
            botonBorrar.SetActive(false);
            seccionResultado.SetActive(false);
        }
        else
        {
            botonVerResumen.SetActive(true);
            botonBorrar.SetActive(true);
            seccionResultado.SetActive(true);
        }

        if (listaPrefabsTextos == null)
        {
            listaPrefabsTextos = new List <GameObject>();
        }
        jugador = AppController.instance.equipoActual.BuscarPorNombre(nombreJugador);

        estadisticas = _estadisticas;

        parentTransform = panelEstadisticas.GetPanelEstadisticaTransform();

        if (partidoFocus == null)
        {
            posicionText.text = string.Empty;
        }
        else
        {
            posicionText.text = partidoFocus.GetPosicion();
        }

        BorrarPrefabs();
        CrearPrefabs();
    }
Exemplo n.º 11
0
 public void SetTextInLanguage(string _text, AppController.Idiomas _idioma)
 {
     nombreEstadisticaText.SetText(_text, _idioma);
 }
Exemplo n.º 12
0
 private void Start()
 {
     warningText.SetText("No hay suficientes datos para generar la gráfica".ToUpper(), AppController.Idiomas.Español);
     warningText.SetText("There is not enough data to generate the graphic".ToUpper(), AppController.Idiomas.Ingles);
 }
Exemplo n.º 13
0
    public void SetPanelEstadisticasGlobalesEquipo(Partido _partido, bool fromGrafica = false)
    {
        botonVerResultado.SetActive(true);

        partidoFocus = _partido;
        ResultadoEntradaDatos.Resultado _tipoResultado;

        coloresBotones.Clear();
        coloresBotones.Add(AppController.instance.colorTheme.detalle5);
        coloresBotones.Add(AppController.instance.colorTheme.detalle3);

        Deportes.DeporteEnum deporteActual = AppController.instance.equipoActual.GetDeporte();

        switch (deporteActual)
        {
        //NORMAL CON PENALES
        case Deportes.DeporteEnum.Futbol:
        case Deportes.DeporteEnum.HockeyCesped:
        case Deportes.DeporteEnum.HockeyPatines:
        case Deportes.DeporteEnum.Handball:
            resultadoSets.gameObject.SetActive(false);
            resultadoNormal.gameObject.SetActive(true);

            ResultadoNormal _res = (ResultadoNormal)partidoFocus.GetResultadoEntradaDato();
            Debug.Log(_res == null);
            resultadoNormal.CopyDataFrom(_res);
            resultadoNormal.DisableEdition();
            _tipoResultado = resultadoNormal.GetResultado();
            Debug.Log("NORMAL CON PENALES");
            break;

        //NORMAL SIN PENALES
        case Deportes.DeporteEnum.Basket:
        case Deportes.DeporteEnum.Rugby:
        case Deportes.DeporteEnum.Softball:
            resultadoSets.gameObject.SetActive(false);
            resultadoNormal.gameObject.SetActive(true);

            ResultadoNormal _resNorm = (ResultadoNormal)partidoFocus.GetResultadoEntradaDato();

            resultadoNormal.CopyDataFrom(_resNorm);
            resultadoNormal.DisableEdition(false);
            _tipoResultado = resultadoNormal.GetResultado();
            Debug.Log("NORMAL SIN PENALES");
            break;

        //SETS CON TIEBREAK
        case Deportes.DeporteEnum.Padel:
        case Deportes.DeporteEnum.Tenis:
        case Deportes.DeporteEnum.Voley:
            resultadoSets.gameObject.SetActive(true);
            resultadoNormal.gameObject.SetActive(false);

            ResultadoSets    _resSets = (ResultadoSets)partidoFocus.GetResultadoEntradaDato();
            List <SetPrefab> _lista   = _resSets.GetListaSets();

            resultadoSets.BorrarPrefabs();
            foreach (var set in _lista)
            {
                resultadoSets.AgregarSet(set);
            }
            resultadoSets.DisableEdition();
            _tipoResultado = resultadoSets.GetResultado();
            Debug.Log("SETS CON TIEBREAK");
            break;

        default:
            Debug.LogError("ERROR CON EL DEPORTE ACTUAL");
            _tipoResultado = ResultadoEntradaDatos.Resultado.Derrota;
            break;
        }

        /*if (partidoFocus.GetTipoResultadoPartido() == Partido.TipoResultadoPartido.Normal)
         * {
         *  resultadoSets.gameObject.SetActive(false);
         *  resultadoNormal.gameObject.SetActive(true);
         *
         *  ResultadoNormal _res = (ResultadoNormal)partidoFocus.GetResultadoEntradaDato();
         *  Debug.Log(_res == null);
         *  resultadoNormal.CopyDataFrom(_res);
         *  resultadoNormal.DisableEdition();
         *  _tipoResultado = resultadoNormal.GetResultado();
         * }
         * else
         * {
         *  resultadoSets.gameObject.SetActive(true);
         *  resultadoNormal.gameObject.SetActive(false);
         *
         *  ResultadoSets _res = (ResultadoSets)partidoFocus.GetResultadoEntradaDato();
         *  List<SetPrefab> _lista = _res.GetListaSets();
         *
         *  resultadoSets.BorrarPrefabs();
         *  foreach (var set in _lista)
         *  {
         *      resultadoSets.AgregarSet(set);
         *  }
         *  resultadoSets.DisableEdition();
         *  _tipoResultado = resultadoSets.GetResultado();
         * }*/


        if (_tipoResultado == ResultadoEntradaDatos.Resultado.Victoria)
        {
            resultadoText.SetText("Victoria", AppController.Idiomas.Español);
            resultadoText.SetText("Victory", AppController.Idiomas.Ingles);
        }
        else if (_tipoResultado == ResultadoEntradaDatos.Resultado.Derrota)
        {
            resultadoText.SetText("Derrota", AppController.Idiomas.Español);
            resultadoText.SetText("Loss", AppController.Idiomas.Ingles);
        }
        else
        {
            resultadoText.SetText("Empate", AppController.Idiomas.Español);
            resultadoText.SetText("Tie", AppController.Idiomas.Ingles);
        }


        CanvasController.instance.overlayPanel.SetNombrePanel("PARTIDO: " + _partido.GetNombre(), AppController.Idiomas.Español);
        CanvasController.instance.overlayPanel.SetNombrePanel("MATCH: " + _partido.GetNombre(), AppController.Idiomas.Ingles);

        seccionResultado.SetActive(true);
        botonBorrar.SetActive(true);

        Screen.orientation = ScreenOrientation.Portrait;

        if (!fromGrafica)
        {
            CanvasController.instance.AgregarPanelAnterior(CanvasController.Paneles.EstadisticasGlobalesEquipo);
        }

        if (listaPrefabsTextos == null)
        {
            listaPrefabsTextos = new List <GameObject>();
        }

        estadisticas = _partido.GetEstadisticas();

        parentTransform = estadisticasGlobales.SetPanelEstadisticas();

        BorrarPrefabs();
        CrearPrefabs();
    }
Exemplo n.º 14
0
 public void SetNombrePanel(string _nombre, AppController.Idiomas _idioma)
 {
     nombrePanel.SetText(_nombre, _idioma);
 }
Exemplo n.º 15
0
 public void SetValor(string valor, AppController.Idiomas _idioma)
 {
     textValor.SetText(valor, _idioma);
 }
Exemplo n.º 16
0
    public void SetSpriteBotonEquipo(Equipo equipo)
    {
        equipoFocus = equipo;

        int cantJugadores = equipo.GetJugadores().Count;

        if (cantJugadores == 0)
        {
            cantidadJugadoresText.SetText("Equipo vacio".ToUpper(), AppController.Idiomas.Español);
            cantidadJugadoresText.SetText("empy team".ToUpper(), AppController.Idiomas.Ingles);
        }
        else if (cantJugadores == 1)
        {
            cantidadJugadoresText.SetText(equipo.GetJugadores().Count + " jugador".ToUpper(), AppController.Idiomas.Español);
            cantidadJugadoresText.SetText(equipo.GetJugadores().Count + " player".ToUpper(), AppController.Idiomas.Ingles);
        }
        else
        {
            cantidadJugadoresText.SetText(equipo.GetJugadores().Count + " jugadores".ToUpper(), AppController.Idiomas.Español);
            cantidadJugadoresText.SetText(equipo.GetJugadores().Count + " players".ToUpper(), AppController.Idiomas.Ingles);
        }

        //Debug.Log("DEPORTE: " + equipo.GetDeporteNombre() + ", " + (int)equipo.GetDeporte());
        switch (equipo.GetDeporte())
        {
        case Deportes.DeporteEnum.Futbol:
            spriteDeporte.texture = spriteFutbol.texture;
            break;

        case Deportes.DeporteEnum.HockeyCesped:
            spriteDeporte.texture = spriteHockeyCesped.texture;
            break;

        case Deportes.DeporteEnum.Tenis:
            spriteDeporte.texture = spriteTenis.texture;
            break;

        case Deportes.DeporteEnum.Softball:
            spriteDeporte.texture = spriteSoftball.texture;
            break;

        case Deportes.DeporteEnum.Voley:
            spriteDeporte.texture = spriteVoley.texture;
            break;

        case Deportes.DeporteEnum.HockeyPatines:
            spriteDeporte.texture = spriteHockeyPatines.texture;
            break;

        case Deportes.DeporteEnum.Rugby:
            spriteDeporte.texture = spriteRugby.texture;
            break;

        case Deportes.DeporteEnum.Basket:
            spriteDeporte.texture = spriteBasket.texture;
            break;

        case Deportes.DeporteEnum.Handball:
            spriteDeporte.texture = spriteHandball.texture;
            break;

        case Deportes.DeporteEnum.Padel:
            spriteDeporte.texture = spritePadel.texture;
            break;
        }

        //spriteDeporte.texture = listaSprites[(int)equipo.GetDeporte()].texture;

        spriteDeporte.transform.localScale.Set(2f, 2f, 1f);
    }
Exemplo n.º 17
0
 public void SetText(string _text, AppController.Idiomas idioma)
 {
     text.SetText(_text, idioma);
 }
Exemplo n.º 18
0
    public void SetPanel(string nombreEstadistica, bool isPartido, bool datosJugador) //datosJugador=true => estadisticas gobales del jugadoractual, datosJugador=false => estadisticas globales del equipo actual
    {
        _datosJugador = datosJugador;

        ///COSAS DEL GUI
        ActivarPanel();

        ejeXText.SetText("PARTIDO", AppController.Idiomas.Español);
        ejeXText.SetText("MATCH", AppController.Idiomas.Ingles);

        ejeXVerticalText.SetText("PARTIDO", AppController.Idiomas.Español);
        ejeXVerticalText.SetText("MATCH", AppController.Idiomas.Ingles);

        ejeYText.text         = nombreEstadistica;
        ejeYVerticalText.text = nombreEstadistica;


        if (isPartido)
        {
            titleText.SetText("PARTIDOS", AppController.Idiomas.Español);
            titleText.SetText("MATCHES", AppController.Idiomas.Ingles);
        }
        else
        {
            titleText.SetText("PRACTICAS", AppController.Idiomas.Español);
            titleText.SetText("PRACTICES", AppController.Idiomas.Ingles);
        }


        ///OBTENER LOS DATOS PARA GRAFICAR
        if (datosJugador)
        {
            if (isPartido)
            {
                datosGraficaPartidos = ObtenerDatosGraficaPartidos(nombreEstadistica, AppController.instance.jugadorActual.GetPartidos());
            }
            else
            {
                datosGraficaPartidos = ObtenerDatosGraficaPartidos(nombreEstadistica, AppController.instance.jugadorActual.GetPracticas());
            }
        }
        else
        {
            if (isPartido)
            {
                datosGraficaPartidos  = ObtenerDatosGraficaPartidos(nombreEstadistica, AppController.instance.equipoActual.GetPartidos());
                datosGraficaJugadores = ObtenerDatosGraficaJugadores(nombreEstadistica, AppController.instance.equipoActual.GetJugadores(), isPartido);
            }
            else
            {
                datosGraficaPartidos  = ObtenerDatosGraficaPartidos(nombreEstadistica, AppController.instance.equipoActual.GetPracticas());
                datosGraficaJugadores = ObtenerDatosGraficaJugadores(nombreEstadistica, AppController.instance.equipoActual.GetJugadores(), isPartido);
            }
        }


        ///GRAFICAR TODAS LAS GRAFICAS
        graficaFuncionHorizontal.Graficar(datosGraficaPartidos);
        if (datosJugador)
        {
            graficaHistogramaHorizontal.Graficar(datosGraficaPartidos);
        }
        else
        {
            graficaHistogramaHorizontal.Graficar(datosGraficaJugadores);
            graficaBigote.Graficar(datosGraficaJugadores);
        }

        graficaFuncionVertical.Graficar(datosGraficaPartidos);
        if (datosJugador)
        {
            graficaHistogramaVertical.Graficar(datosGraficaPartidos);
        }
        else
        {
            graficaHistogramaVertical.Graficar(datosGraficaJugadores);
        }


        ///ESTADO INICIAL DE LAS GRAFICAS (CUAL SE MUESTRA POR PRIMERO)
        //EMPIEZO CON LAS VERTICALES
        vertical           = true;
        Screen.orientation = ScreenOrientation.Portrait;
        graficasVerticales.SetActive(true);
        graficasHorizontales.SetActive(false);

        //EMPIEZO CON LA GRAFICA "FUNCION" EN TANTO VERTICAL COMO HORIZONTAL
        graficaHistogramaHorizontal.gameObject.SetActive(false);
        graficaFuncionHorizontal.gameObject.SetActive(true);
        graficaFuncionVertical.gameObject.SetActive(true);
        graficaHistogramaVertical.gameObject.SetActive(false);
        //PONGO LOS PREFABS DE LA FUNCION VERTICAL
        graficaFuncionVertical.BorrarPrefabs();
        graficaFuncionVertical.CrearPrefabs(datosGraficaPartidos, false);
    }