private void Start()
    {
        List <Word> askableWord = new List <Word>();

        foreach (Word w in Db_Learning.GetAllWords())
        {
            if (DateTime.Now > w.wordProgress.Date)
            {
                askableWord.Add(w);
            }
        }

        if (askableWord.Count > 0)
        {
            AskQuestion(askableWord);
        }
    }
Exemple #2
0
    void GetAllLearningWords()
    {
        List <Word> words = Db_Learning.GetAllWords();

        foreach (Word word in words)
        {
            GameObject wordObj = new GameObject();
            wordObj.transform.localScale = new Vector3(1, 1, 1);
            wordObj.transform.parent     = panel.transform;
            wordObj.AddComponent <Text>();

            Text text = wordObj.GetComponent <Text>();
            text.text                 = word.WordIng + " - " + word.WordTr;
            text.font                 = Resources.GetBuiltinResource(typeof(Font), "Arial.ttf") as Font;
            text.fontSize             = 32;
            text.alignment            = TextAnchor.MiddleCenter;
            text.color                = Color.black;
            text.transform.localScale = new Vector3(1, 1, 1);
        }
    }