示例#1
0
        public static CozyAnimate Create(CozyAnimation animation)
        {
            var a = new CozyAnimate();

            a.InitWithAnimation(animation);
            return(a);
        }
示例#2
0
        public static CozyAnimation Create(List<CozyAnimationFrame> frameList, float delayPreUnit = 0.0f, uint loops = 1)
        {
            var animation = new CozyAnimation();
            animation.InitWithAnimationFrames(frameList, delayPreUnit, loops);

            return animation;
        }
示例#3
0
        public static CozyAnimation Create()
        {
            var animation = new CozyAnimation();

            animation.Init();
            return(animation);
        }
示例#4
0
        public object Clone()
        {
            var a = new CozyAnimation();

            a.InitWithAnimationFrames(_Frames, DelayPerUnit, Loops);
            a.RestoreOriginalFrame = RestoreOriginalFrame;
            return(a);
        }
示例#5
0
        public static CozyAnimation Create(List <CozyAnimationFrame> frameList, float delayPreUnit = 0.0f, uint loops = 1)
        {
            var animation = new CozyAnimation();

            animation.InitWithAnimationFrames(frameList, delayPreUnit, loops);

            return(animation);
        }
示例#6
0
        public bool InitWithAnimation(CozyAnimation animation)
        {
            float signleDuration = animation.Duration;
            base.InitWithDuraction(signleDuration * animation.Loops);
            NextFrame = 0;
            Animaction = animation;
            OrigFrame = null;
            ExecutedLoops = 0;
            float accumUnitOfTime = 0;
            float newUnitOfTimeValue = signleDuration / animation.TotalDelayUnits;

            var frames = animation.Frames;
            foreach(var obj in frames)
            {
                float value = (accumUnitOfTime * newUnitOfTimeValue) / signleDuration;
                accumUnitOfTime += obj.DelayUnits;
                SplitTimes.Add(value);
            }

            return true;
        }
示例#7
0
        public bool InitWithAnimation(CozyAnimation animation)
        {
            float signleDuration = animation.Duration;

            base.InitWithDuraction(signleDuration * animation.Loops);
            NextFrame     = 0;
            Animaction    = animation;
            OrigFrame     = null;
            ExecutedLoops = 0;
            float accumUnitOfTime    = 0;
            float newUnitOfTimeValue = signleDuration / animation.TotalDelayUnits;

            var frames = animation.Frames;

            foreach (var obj in frames)
            {
                float value = (accumUnitOfTime * newUnitOfTimeValue) / signleDuration;
                accumUnitOfTime += obj.DelayUnits;
                SplitTimes.Add(value);
            }

            return(true);
        }
示例#8
0
 public object Clone()
 {
     var a = new CozyAnimation();
     a.InitWithAnimationFrames(_Frames, DelayPerUnit, Loops);
     a.RestoreOriginalFrame = RestoreOriginalFrame;
     return a;
 }
示例#9
0
 public static CozyAnimation Create()
 {
     var animation = new CozyAnimation();
     animation.Init();
     return animation;
 }
示例#10
0
 public static CozyAnimate Create(CozyAnimation animation)
 {
     var a = new CozyAnimate();
     a.InitWithAnimation(animation);
     return a;
 }