def playSliderUpdateSound(oldCount, newCount, totalCount): WWISE.WW_setRTPCBus(SliderSoundEvents.RTPC_PROGRESS_BAR, newCount * 100.0 / totalCount) if newCount > oldCount: SoundGroups.g_instance.playSound2D( SliderSoundEvents.SLIDER_SINGLE_PLUS) elif newCount < oldCount: SoundGroups.g_instance.playSound2D( SliderSoundEvents.SLIDER_SINGLE_MINUS)
def setVolume(self, categoryName, volume, updatePrefs=True): WWISE.WW_setRTPCBus('RTPC_ext_menu_volume_{}'.format(categoryName), volume * 100.0) if updatePrefs: self.__volumeByCategory[categoryName] = volume self.savePreferences() if categoryName == 'music' or categoryName == 'ambient': self.onMusicVolumeChanged(categoryName, self.__masterVolume, self.getVolume(categoryName)) self.onVolumeChanged(categoryName, volume)
def playShellUpdateSound(oldCount, newCount, totalCount): WWISE.WW_setRTPCBus(TankSetupSoundEvents.RTPC_SHELLS_PROGRESS_BAR, newCount * 100.0 / totalCount) if newCount > oldCount: playSound(TankSetupSoundEvents.AMMO_SINGLE_PLUS) elif newCount < oldCount: playSound(TankSetupSoundEvents.AMMO_SINGLE_MINUS)