Esempio n. 1
0
 protected void SetSprite(SpriteModel s)
 {
     _sprite = s;
     _image.Width = s.Width * Zoom;
     _image.Height = s.Height * Zoom;
     this.Width = _image.Width;
     this.Height = _image.Height;
 }
Esempio n. 2
0
 public SpriteCursor(SpriteModel sprite, int snapWidth = 1, int snapHeight = 1)
     : base(sprite.HotSpot)
 {
     _sprite = sprite;
     _snapWidth = snapWidth;
     _snapHeight = snapHeight;
     DrawOutline = false;
 }
        private void StageChanged(object sender, StageChangedEventArgs e)
        {
            _currentStage = e.Stage;

            if (_currentStage != null)
            {
                var player = _currentStage.Project.EntityByName("Player");
                if (player != null)
                {
                    _playerSprite = SpriteModel.ForEntity(player, _currentStage.Project);
                }
            }

            OnPropertyChanged("HasStage");
        }