public SpriteAnimationStepWrapper(
     SpriteAnimationAsset asset,
     SpriteAnimationStep step,
     SpriteWrapper spriteWrapper) : this(asset, step)
 {
     this._spriteWrapper = spriteWrapper;
 }
        public static void IdentifiableContentComponent_SpriteAnimationTest()
        {
            var spriteAnimation = new SpriteAnimation();
            var spriteAnimator  = new SpriteAnimator(spriteAnimation);

            var spriteAnimationId = spriteAnimation.Id;

            var steps = new List <SpriteAnimationStep>();

            for (var i = 0; i < 10; i++)
            {
                var step = new SpriteAnimationStep();
                step.Sprite = new Sprite();
                steps.Add(step);
                spriteAnimation.AddStep(step);
            }
            ;

            var firstStep     = steps.First();
            var firstSpriteId = firstStep.Sprite.Id;

            Assert.True(spriteAnimator.HasContent(firstSpriteId));

            spriteAnimator.RemoveContent(firstSpriteId);
            Assert.False(spriteAnimator.HasContent(firstSpriteId));
            Assert.Null(firstStep.Sprite);

            var lastStep     = steps.Last();
            var lastSpriteId = lastStep.Sprite.Id;

            Assert.True(spriteAnimator.HasContent(lastSpriteId));

            spriteAnimator.RemoveContent(lastSpriteId);
            Assert.False(spriteAnimator.HasContent(lastSpriteId));
            Assert.Null(lastStep.Sprite);
            Assert.True(spriteAnimator.HasContent(spriteAnimationId));

            spriteAnimator.RemoveContent(spriteAnimationId);
            Assert.False(spriteAnimator.HasContent(spriteAnimationId));
        }
 public SpriteAnimationStepWrapper(SpriteAnimationAsset asset, SpriteAnimationStep step)
 {
     this._asset = asset;
     this.Step   = step;
 }