コード例 #1
0
        public void AddAnimationTestAddMultipleAnimationParametrized(int num)
        {
            SpriteAnimator animator = new SpriteAnimator();
            Dictionary <string, FrameAnimation> animDict = new Dictionary <string, FrameAnimation>();

            FrameAnimation[] animations = new FrameAnimation[num];
            for (int i = 0; i < num; i++)
            {
                string         name = "name" + i;
                FrameAnimation anim = new FrameAnimation(10f, false, i, 20 * i);
                animDict.Add(name, anim);
                animator.AddAnimation(name, anim);
            }
            Assert.IsTrue(animDict.All(x => animator.IsAnimationInList(x.Key) == true));
        }