Esempio n. 1
0
 def __handleIdleCameraActivation(self, event):
     if self.__currentLocation is not None:
         return
     else:
         positionControlValue = _RTPC_MUSIC_POSITION_CONTROL_MAX_VALUE if event.ctx['started'] else _RTPC_MUSIC_POSITION_CONTROL_MIN_VALUE
         NewYearSoundsManager.setRTPC(NewYearSoundVars.RTPC_MUSIC_POSITION_CONTROL, positionControlValue)
         return
Esempio n. 2
0
 def __update(self):
     jukeboxEntity = self.__getJukeboxEntity()
     if jukeboxEntity is None:
         return
     else:
         camera = BigWorld.camera()
         cameraPos = camera.position
         distance = jukeboxEntity.position.distTo(cameraPos)
         diff = math.fabs(self.__lastDistance - distance)
         if diff > _MIN_DIST:
             NewYearSoundsManager.setRTPC(NewYearSoundVars.RTPC_JUKEBOX_DISTANCE, distance)
             self.__lastDistance = distance
         return
Esempio n. 3
0
 def setCurrentLocation(self, location, force=False):
     if force or self.__currentLocation != location:
         self.__currentLocation = location
         if self.__currentLocation == CustomizationObjects.FAIR:
             self.__startTicker()
         else:
             self.__stopTicker()
             NewYearSoundsManager.setRTPC(NewYearSoundVars.RTPC_JUKEBOX_DISTANCE, 0)
         if self.__currentLocation is not None:
             positionControlValue = _RTPC_MUSIC_POSITION_CONTROL_MAX_VALUE
         else:
             positionControlValue = _RTPC_MUSIC_POSITION_CONTROL_MIN_VALUE
         NewYearSoundsManager.setRTPC(NewYearSoundVars.RTPC_MUSIC_POSITION_CONTROL, positionControlValue)
     NewYearSoundsManager.setRTPC(NewYearSoundVars.RTPC_GIFT_AVAILABILITY, _RTPC_GIFT_AVAILABILITY_MIN_VALUE)
     return
Esempio n. 4
0
 def setLevelAtmosphere(level):
     NewYearSoundsManager.setRTPC(NewYearSoundVars.RTPC_LEVEL_ATMOSPHERE, level)
Esempio n. 5
0
 def fini(self):
     NewYearSoundsManager.setRTPC(NewYearSoundVars.RTPC_MUSIC_POSITION_CONTROL, _RTPC_MUSIC_POSITION_CONTROL_MIN_VALUE)
     g_eventBus.removeListener(CameraRelatedEvents.IDLE_CAMERA, self.__handleIdleCameraActivation)
     self.__stopTicker()
     self.__entityID = None
     return