DeenGames.Utils.Tower.Core.TowerScreen.FindText C# (CSharp) Method

FindText() public method

Find some text by content. This is useful because we generally create texts in Initialize, and reference them (if need be) in Activity/Update methods. Note that if there are multiple text objects, it returns the first one, depending on the order FRB stores them (usually, the one created first). If no Text object exists with the specified displayText, then we return null.
public FindText ( string displayText ) : Text
displayText string
return FlatRedBall.Graphics.Text
        public Text FindText(string displayText)
        {
            for (int i = 0; i < this.mTexts.Count; i++)
            {
                Text current = this.mTexts[i];
                if (current.DisplayText == displayText)
                {
                    return current;
                }
            }

            return null;
        }