예제 #1
0
    void CreateWord(string word)
    {
        // Create Game Object.
        GameObject go = GameObject.Instantiate(wordObjPrefab, wordsParentTransform);

        // Name Game Object.
        go.name = word;

        // Initiate the word controller script.
        go.GetComponent <WordComponent>().OurWord = word;

        // Register the word with us.
        ActiveWords.Add(go.GetComponent <WordComponent>());

        // Track this new word.
        st.ChangeLettersSpawned(word.Length);
        st.ChangeWordsSpawned(1);

        // Go juice, go!
        go.SetActive(true);
    }