Пример #1
0
 public void Drive()
 {
     _engine.Start();
     _transmission.ShiftUp();
     _steering.Left();
     _brakes.Stop();
 }
Пример #2
0
 void Update()
 {
     _followPathComp.Follow(_carComp.currentSpeed, carData.turningRadius);
     if (_brakesComp.isBraking)
     {
         _carComp.currentSpeed = _brakesComp.Stop(_carComp.currentSpeed);
     }
     if (_gasComp.isDriving)
     {
         _carComp.currentSpeed = _gasComp.Move(_carComp.currentSpeed);
     }
     _carComp.RotateTires();
 }