public void Drive() { _engine.Start(); _transmission.ShiftUp(); _steering.Left(); _brakes.Stop(); }
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(); }