Beispiel #1
0
        //------------------------------------------------------------------
        public void Accelerate(Composite action, int times = 1)
        {
            if (driver.Car.Velocity >= driver.Velocity) return;

            foreach (var i in Enumerable.Range (0, times))
                driver.Car.Accelerate();
        }
Beispiel #2
0
 //------------------------------------------------------------------
 public void Accelerate(Composite action, int times = 1)
 {
     if (Car.Velocity < Car.Driver.Velocity)
         action.Add (new Repeated (Car.Accelerate, times) {Name = "Accelerate"});
 }
Beispiel #3
0
 //------------------------------------------------------------------
 public void Brake(Composite action, int times = 1)
 {
     action.Add (new Repeated (Car.Brake, times) {Name = "Brake"});
 }