Пример #1
0
        public ISpeedProgress AddTicks(int ticks)
        {
            var currentTicks = CurrentSpeed + ticks;
            var progress     = new SpeedProgress(this.InitialSpeed, currentTicks, this.TargetSpeed, this.Weighting);

            return(progress);
        }
Пример #2
0
        public ISpeedProgress SubtractTicks(int ticks)
        {
            var currentTicks = CurrentSpeed - ticks;

            if (currentTicks < 0)
            {
                currentTicks = 0;
            }

            var progress = new SpeedProgress(this.InitialSpeed, currentTicks, this.TargetSpeed, this.Weighting);

            return(progress);
        }
Пример #3
0
        public ISpeedProgress NewSpeedSpeedProgress(int value)
        {
            var progress = new SpeedProgress(this.InitialSpeed, value, this.TargetSpeed, this.Weighting);

            return(progress);
        }