public void UpdateCount(string word, int newCount) { string upperWord = word.ToUpper(); if (filteredWords.ContainsKey(upperWord)) { upperWord = filteredWords[upperWord].ToUpper(); } if (!remainingWords.ContainsKey(upperWord)) { Debug.Log("RemainingWordlistBehaviour.UpdateCount(): word not found (" + word + ")"); return; } GameObject go = remainingWords[upperWord]; go.transform.Find(REMAINING_WORD_ITEM_COUNT).GetComponent <Text>().text = "x" + newCount; CanvasFadeBehaviour strikethoughFader = go.transform.Find(REMAINING_WORD_ITEM_STRIKETHROUGH).GetComponent <CanvasFadeBehaviour>(); CanvasFadeBehaviour goFader = go.GetComponent <CanvasFadeBehaviour>(); if (newCount == 0) { strikethoughFader.Show(true); goFader.Hide(true); } else { strikethoughFader.Hide(true); goFader.Show(true); } }
public void Hide(bool animated) { mCanvasFadeBehaviour.Hide(animated); }