예제 #1
0
        public Sprite(string spriteName, float x, float y, float width, float height, SKPaint paint = null) : base(x, y, height, width)
        {
            if (paint == null)
            {
                _paint             = new SKPaint();
                _paint.Color       = new SKColor(255, 255, 255);
                _paint.IsAntialias = true;
            }
            else
            {
                _paint = paint;
            }

            var spriteData = SpriteLoader.Instance.GetData(spriteName);

            _spriteModel = new SpriteModel(spriteData);
        }
예제 #2
0
        public void UpdateSprite(string spriteName)
        {
            var spriteData = SpriteLoader.Instance.GetData(spriteName);

            _spriteModel = new SpriteModel(spriteData);
        }