-------------------------------------------------------------------------------- -- Handler.......... : onKeyboardKeyDown -- Author........... : -- Description...... : -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function CarDemoMain.onKeyboardKeyDown ( kKeyCode ) -------------------------------------------------------------------------------- if ( kKeyCode == input.kKeyLeft ) then object.sendEvent ( this.hCar ( ), "Car", "onTurnLeft", true ) elseif ( kKeyCode == input.kKeyRight ) then object.sendEvent ( this.hCar ( ), "Car", "onTurnRight", true ) elseif ( kKeyCode == input.kKeyUp ) then object.sendEvent ( this.hCar ( ), "Car", "onGoFront", true ) elseif ( kKeyCode == input.kKeyDown ) then object.sendEvent ( this.hCar ( ), "Car", "onGoBack", true ) end -------------------------------------------------------------------------------- end --------------------------------------------------------------------------------