MonoGdx.Scene2D.Group.FindActor C# (CSharp) Method

FindActor() public method

public FindActor ( string name ) : Actor
name string
return Actor
        public Actor FindActor(string name)
        {
            foreach (Actor child in Children) {
                if (name == child.Name)
                    return child;
            }

            foreach (Actor child in Children) {
                if (child is Group) {
                    Actor actor = (child as Group).FindActor(name);
                    if (actor != null)
                        return actor;
                }
            }

            return null;
        }