Exemplo n.º 1
0
    void DrawData()
    {
        CancelInvoke();
        Data.Instance.capitulosData.activeCapitulo = null;
        int id = 0;

        all.Clear();
        Utils.RemoveAllChildsIn(container);

        foreach (CapitulosData.Capitulo c in Data.Instance.capitulosData.capitulos)
        {
            if (
                (state == states.ONLY_ACTIVE && !Data.Instance.dateData.IsFromThePast(c.date))
                ||
                state == states.ALL
                )
            {
                CheckAddMonth(c.date);

                AdminButton button = Instantiate(adminButton);
                button.Init(id, c.date + " " + c.time + "hs", OnClicked);
                AddGameObject(button.gameObject);
                all.Add(button);
            }
            id++;
        }
        if (all.Count == 0)
        {
            isEmptyPanel.SetActive(true);
        }
        else
        {
            isEmptyPanel.SetActive(false);
        }
    }
Exemplo n.º 2
0
    void DrawData()
    {
        CancelInvoke();
        Data.Instance.capitulosData.activeCapitulo = null;
        int id = 0;

        all.Clear();
        Utils.RemoveAllChildsIn(container);
        foreach (CapitulosData.Capitulo c in Data.Instance.capitulosData.capitulos)
        {
            if (
                (state == states.ONLY_ACTIVE && !Data.Instance.dateData.IsFromThePast(c.date))
                ||
                state == states.ALL
                )
            {
                AdminButton button = Instantiate(adminButton);
                button.transform.SetParent(container);
                button.transform.localScale = Vector3.one;
                button.Init(id, c.date + " " + c.time + "hs", OnClicked);
                all.Add(button);
            }
            id++;
        }
        if (all.Count == 0)
        {
            SetSignal("No hay capítulos...");
        }
        else
        {
            SetSignal("");
        }
    }
Exemplo n.º 3
0
    void DrawData()
    {
        CancelInvoke();
        int id = 0;

        Utils.RemoveAllChildsIn(container);
        foreach (TrainingData.Training q in Data.Instance.trainingData.entrenamiento)
        {
            AdminButton button = Instantiate(adminButton);
            button.transform.SetParent(container);
            button.transform.localScale = Vector3.one;
            button.Init(id, q.preguntas.pregunta, OnClicked);
            id++;
        }
    }