コード例 #1
0
        private void DoTest(float time, float expected, float scale, bool looped)
        {
            ISimpleAnimated animated = Substitute.For <ISimpleAnimated>();
            var             animator = CreateLinear(scale, looped);

            animator.Update(time);
            animator.Apply(animated);
            animated.Received().Apply(expected);
        }
コード例 #2
0
ファイル: Pulse.cs プロジェクト: vkuskov/UIBehaviorKit
        public void Apply(ISimpleAnimated animated)
        {
            float value = 0;

            if (currentTime <= timeIn)
            {
                value = curveIn.Evaluate(currentTime);
            }
            else
            {
                value = curveOut.Evaluate(currentTime - timeIn);
            }
            animated.Apply(value);
        }
コード例 #3
0
ファイル: Linear.cs プロジェクト: vkuskov/UIBehaviorKit
 public void Apply(ISimpleAnimated fadeAway)
 {
     fadeAway.Apply(animationCurve.Evaluate(currentTime));
 }