Ejemplo n.º 1
0
        public void RemoveButton(AbstractGuiButton button)
        {
            if (button is SpriteGuiButton)
            {
                _game.SpriteBatchManager.UISprites.Remove((button as SpriteGuiButton).Sprite);
            }
            else if (button is SpriterGuiButton)
            {
                _game.SpriteBatchManager.RemoveSpriterAnimator((button as SpriterGuiButton).Animator(), Layer.UI);
            }

            _buttons.Remove(button);
        }
Ejemplo n.º 2
0
        public void AddButton(AbstractGuiButton button)
        {
            _buttons.Add(button);

            if (button is SpriteGuiButton)
            {
                _game.SpriteBatchManager.UISprites.Add((button as SpriteGuiButton).Sprite);
            }
            else if (button is SpriterGuiButton)
            {
                _game.SpriteBatchManager.AddSpriterAnimator((button as SpriterGuiButton).Animator(), Layer.UI);
            }
        }
Ejemplo n.º 3
0
        public void AddButton(AbstractGuiButton button)
        {
            _buttons.Add(button);

            if (button is SpriteGuiButton)
            {
                _game.SpriteBatchManager.UISprites.Add((button as SpriteGuiButton).Sprite);
            }
            else if (button is SpriterGuiButton)
            {
                var spriterButton = (button as SpriterGuiButton);
                spriterButton.SubstituteEntity.Reset();
                _game.SpriteBatchManager.AddSpriterAnimator(spriterButton.Animator(), Layer.UI);
            }
        }