Esempio n. 1
0
        public ISpeedProgress AddTicks(int ticks)
        {
            var currentTicks = CurrentSpeed + ticks;
            var progress     = new SpeedProgress(this.InitialSpeed, currentTicks, this.TargetSpeed, this.Weighting);

            return(progress);
        }
Esempio n. 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);
        }
Esempio n. 3
0
        public ISpeedProgress NewSpeedSpeedProgress(int value)
        {
            var progress = new SpeedProgress(this.InitialSpeed, value, this.TargetSpeed, this.Weighting);

            return(progress);
        }