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

            _baseColor = _paint.Color;

            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);
        }