-------------------------------------------------------------------------------- -- Handler.......... : onTurnRight -- Author........... : -- Description...... : -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function Car.onTurnRight ( b ) -------------------------------------------------------------------------------- this.bTurnRight ( b ) if ( b ) then if ( this.bTurnLeft ( ) ) then this.turnWheels ( 0 ) else this.turnWheels ( 30 ) end else if ( this.bTurnLeft ( ) ) then this.turnWheels ( -30 ) else this.turnWheels ( 0 ) end end -------------------------------------------------------------------------------- end --------------------------------------------------------------------------------