Пример #1
0
    public void AddWord()
    {
        Word word = new Word(WordParser.GetRandomWord(), spawner.SpawnWord());

        words.Add(word);
        Debug.Log("Random word was spawned succesfully : " + word.text);
    }
Пример #2
0
    protected virtual void GenerateNewWord(Worker w)
    {
        List <char> bannedCharacters = new List <char>();

        for (int i = 0; i < workers.Count; i++)
        {
            if (!workers[i].Fired && !string.IsNullOrEmpty(workers[i].CurrentWord))
            {
                bannedCharacters.Add(workers[i].CurrentWord[0]);
            }
        }
        w.SetWord(WordParser.GetRandomWord(DifficultyManager.GetWordLength(), bannedCharacters.ToArray()));
    }
 public void ChooseNewWord()
 {
     text.text = wordParser.GetRandomWord();
     startTime = Time.timeSinceLevelLoad;
 }