Ejemplo n.º 1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            base.LoadContent();
            new TextSpriteFlashingEffectOverTime(1, _textSprite);

            TextSpriteDrawer.AddTextSprite(_textSprite);
            TextSpriteUpdater.AddToUpdate(_textSprite);
            // TODO: use this.Content to load your game content here
        }
Ejemplo n.º 2
0
        public void AddDrawable(IDrawable drawable)
        {
            ISprite sprite = drawable as ISprite;

            if (sprite != null)
            {
                SpriteDrawer.AddSprite(sprite);
                SpriteUpdater.AddToUpdate(sprite);
            }

            ITextSprite textSprite = drawable as ITextSprite;

            if (textSprite != null)
            {
                TextSpriteDrawer.AddTextSprite(textSprite);
                TextSpriteUpdater.AddToUpdate(textSprite);
            }
        }