-------------------------------------------------------------------------------- -- Function......... : setupSfx -- Author........... : -- Description...... : -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function Car.setupSfx ( ) -------------------------------------------------------------------------------- local s = application.getCurrentUserScene ( ) if ( s ~= nil ) then local o1 = scene.createRuntimeObject ( s, this.sWheelSfxModel ( ) ) local o2 = scene.createRuntimeObject ( s, this.sWheelSfxModel ( ) ) local o3 = scene.createRuntimeObject ( s, this.sWheelSfxModel ( ) ) local o4 = scene.createRuntimeObject ( s, this.sWheelSfxModel ( ) ) if ( o1 == nil ) then log.error ( "could not create car wheel sfx 1 !" ) end if ( o2 == nil ) then log.error ( "could not create car wheel sfx 2 !" ) end if ( o3 == nil ) then log.error ( "could not create car wheel sfx 3 !" ) end if ( o4 == nil ) then log.error ( "could not create car wheel sfx 4 !" ) end this.hWheelSfxBL ( o1 ) this.hWheelSfxBR ( o2 ) this.hWheelSfxFL ( o3 ) this.hWheelSfxFR ( o4 ) object.setParent ( o1, this.hWheelBL ( ), false ) object.setParent ( o2, this.hWheelBR ( ), false ) object.setParent ( o3, this.hWheelFL ( ), false ) object.setParent ( o4, this.hWheelFR ( ), false ) object.setTranslation ( o1, 0, -0.4, 0, object.kParentSpace ) object.setTranslation ( o2, 0, -0.4, 0, object.kParentSpace ) object.setTranslation ( o3, 0, -0.4, 0, object.kParentSpace ) object.setTranslation ( o4, 0, -0.4, 0, object.kParentSpace ) end -------------------------------------------------------------------------------- end --------------------------------------------------------------------------------