Exemplo n.º 1
0
        // Force methods.
        public virtual void Throttle()
        {
            float gear     = (gears.GetGear(Math.Abs(exSpeed.Clamp(velocity.Length()))) / gears.GearCount) * 100.0f;
            float throttle = gear * exAcc.Metric;

            Vector2 dir = new Vector2(this.direction.X, this.direction.Y);

            dir.Normalize();
            ApplyForce(dir * exAcc.Value);
            exAcc.SetValue(exAcc.Value + (exAcc.Metric + throttle));
        }