Exemple #1
0
        public INameable FindByName(string name)
        {
            Sprite sprite = mSprites.FindByName(name);

            {
                if (sprite != null)
                {
                    return(sprite);
                }
            }

            foreach (SpriteGrid spriteGrid in mSpriteGrids)
            {
                if (spriteGrid.Name == name)
                {
                    return(spriteGrid);
                }
            }


            SpriteFrame spriteFrame = mSpriteFrames.FindByName(name);
            {
                if (spriteFrame != null)
                {
                    return(spriteFrame);
                }
            }

            Text text = mTexts.FindByName(name);

            {
                if (text != null)
                {
                    return(text);
                }
            }

            return(null);
        }