def setPeriodInfo(self, period, endTime, length, soundID = None):
     self._period = period
     self._endTime = endTime
     self._length = length
     if soundID:
         self._sound = Sound(soundID)
     self.__setCallback()
Example #2
0
 def playControlSound(self, state, type, id):
     sound = self.sounds.getControlSound(type, state, id)
     if sound is not None:
         Sound(sound).play()
         if state == 'press':
             VibroManager.g_instance.playButtonClickEffect(type)
     return
Example #3
0
 def __init__(self, parentUI):
     self.proxy = proxy(self)
     self.__cfg = dict()
     player = BigWorld.player()
     arena = player.arena
     arenaType = arena.arenaType
     self.__cfg['texture'] = arenaType.minimap
     self.__cfg['teamBasePositions'] = arenaType.teamBasePositions
     self.__cfg['teamSpawnPoints'] = arenaType.teamSpawnPoints
     self.__cfg['controlPoints'] = arenaType.controlPoints
     self.__points = {'base': {}, 'spawn': {}}
     self.__backMarkers = {}
     self.__entries = {}
     self.__enemyEntries = {}
     self.__main = None
     self.__vehiclesWaitStart = []
     self.__isStarted = False
     self.__parentUI = parentUI
     self.__ownUI = None
     self.__ownEntry = dict()
     self.__aoiToFarCallbacks = dict()
     self.__deadCallbacks = dict()
     self.__sndAttention = Sound('/GUI/notifications_FX/minimap_attention')
     self.__isFirstEnemyMarked = False
     self.__checkEnemyLengthID = None
     self.__markedPSGs = []
     self.zIndexManager = MinimapZIndexManager()
     self.__observedVehicleId = -1
     return
Example #4
0
 def tryPlaySnd(self, sndType, state, type, id):
     sound = self.__soundEvents.get(sndType, SoundSettings()).getSoundName(
         type, id, state)
     if sound:
         Sound(sound).play()
         if state == 'press':
             Vibroeffects.VibroManager.g_instance.playButtonClickEffect(
                 type)
Example #5
0
    def playSound(self, dictPath):
        if dictPath is None:
            return
        scope = self.__soundEvents
        for key in str(dictPath).split('.'):
            if key not in scope:
                return
            scope = scope[key]

        if type(scope) != str:
            LOG_ERROR('Invalid soundpath under key: %s', dictPath)
            return
        Sound(scope).play()
Example #6
0
 def setPlayerAssistResult(self, assistType, vehiclesIDs):
     old__start(self, assistType, vehiclesIDs)
     if assistType == _SET.SPOTTED:
         player = BigWorld.player()
         arena = player.arena
         msgm = MessageManager(vehiclesIDs)
         for idV in vehiclesIDs:
             if SpotExtended.myConf['showMarker']:
                 Utils.waitForPosition(idV, arena,
                                       partial(mm.addMarker, idV, player))
             if SpotExtended.myConf['showMessage']:
                 Utils.waitForPosition(
                     idV, arena, partial(msgm.add, idV, player, arena))
             if SpotExtended.myConf['showMinimapEffect']:
                 Utils.minimapPulse(idV)
         if SpotExtended.myConf['playSound']:
             Sound(SpotExtended.myConf['sound']).play()
Example #7
0
 def playEffectSound(self, effectName):
     sound = self.sounds.getEffectSound(effectName)
     if sound is not None:
         Sound(sound).play()
Example #8
0
 def sound(assist_type):
     if '%s' % assist_type in config.data['sound']:
         if config.data['sound'][assist_type] != '': Sound(config.data['sound'][assist_type]).play()