示例#1
0
        public static List<Text> GetAndCreateTexts(GameScreen i_GameScreen, List<string> i_Texts, SpritesFactory.eSpriteType i_SpriteType, float i_PositionX, float i_PositionY)
        {
            Text spriteText = null;
            List<Text> texts = new List<Text>();
            float dynamicPositionY = i_PositionY;
            foreach (string text in i_Texts)
            {
                spriteText = SpritesFactory.CreateSprite(i_GameScreen, i_SpriteType) as Text;
                if (spriteText != null)
                {
                    spriteText.Position = new Vector2(i_PositionX, dynamicPositionY);
                    spriteText.TextString = text;
                    dynamicPositionY += spriteText.Height;
                }

                texts.Add(spriteText);
            }

            return texts;
        }
示例#2
0
        public static List <Text> GetAndCreateTexts(GameScreen i_GameScreen, List <string> i_Texts, SpritesFactory.eSpriteType i_SpriteType, float i_PositionX, float i_PositionY)
        {
            Text        spriteText       = null;
            List <Text> texts            = new List <Text>();
            float       dynamicPositionY = i_PositionY;

            foreach (string text in i_Texts)
            {
                spriteText = SpritesFactory.CreateSprite(i_GameScreen, i_SpriteType) as Text;
                if (spriteText != null)
                {
                    spriteText.Position   = new Vector2(i_PositionX, dynamicPositionY);
                    spriteText.TextString = text;
                    dynamicPositionY     += spriteText.Height;
                }

                texts.Add(spriteText);
            }

            return(texts);
        }