コード例 #1
0
 private GameObject CreateTextObject(int i, string type, GameObject slot, PhraseValidator phraseValidatorRef)
 {
     if (slot.GetComponentInChildren<Text>() == null)
     {
         GameObject text = null;
         string word = wordBank.GetWord(type);
         text = Instantiate(textObject, Vector3.zero, Quaternion.identity) as GameObject;
         wordValuesDto dto = text.GetComponent<wordValuesDto>();
         //Debug.Log("Word Text: " + word);
         //Debug.Log("Word Type: " + phraseValidatorRef.phraseMatch[i]);
         dto.wordText = word;
         dto.wordType = type;
         text.GetComponent<Text>().text = word;
         text.transform.SetParent(slot.transform);
         return text;
     }
     return null;
 }
コード例 #2
0
	public void Start() {
		phraseValidator = panel.GetComponent<PhraseValidator>();

	}