public LRWord(string _word, LRWordDisplay _display) { word = _word; typeIndex = 0; display = _display; display.SetWord(word); }
public LRWordDisplay SpawnWord() { Vector3 randomPosition = new Vector3(960f, 540f); GameObject wordObj = Instantiate(wordPrefab, randomPosition, Quaternion.identity, wordCanvas); LRWordDisplay wordDisplay = wordObj.GetComponent <LRWordDisplay>(); return(wordDisplay); }