private void ShowAnswerWord(List <string> answerWord) { for (int i = 0; i < answerWord.Count; i++) { SearchWord search = new SearchWord(); search = word[i]; //从保存数据判断是否是已经完成的 LineData data = null; if (lined.Count != 0) { for (int j = 0; j < lined.Count; j++) { if (lined[j].word.ToLower() == answerWord[i].ToLower()) { data = lined[j]; break; } } } search.gameObject.SetActive(true); search.SetTextAndDoneWidth(answerWord[i]); if (data != null) { int beginIndex = data.begin.x * wordCol + data.begin.y; Vector2 begin = wordGroup.transform.GetChild(beginIndex).GetComponent <RectTransform> ().anchoredPosition; if (hintInital.Contains(beginIndex)) { wordGroup.transform.GetChild(beginIndex).GetComponent <SearchCell> ().ChangeBgColor(Color.white); } Vector2 end = wordGroup.transform.GetChild(data.end.x * wordCol + data.end.y).GetComponent <RectTransform> ().anchoredPosition; SearchController.instance.drawer.SetRightLine(begin, end, colors[data.ColorIndex]); search.Done(colors[data.ColorIndex]); } else { answer.Add(search); } } }