当前位置: 首页>>代码示例>>Python>>正文


Python BattleReplay类代码示例

本文整理汇总了Python中BattleReplay的典型用法代码示例。如果您正苦于以下问题:Python BattleReplay类的具体用法?Python BattleReplay怎么用?Python BattleReplay使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了BattleReplay类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: changeEngineMode

 def changeEngineMode(self, mode, forceSwinging = False):
     self.__engineMode = mode
     if self.detailedEngineState is not None:
         self.detailedEngineState.setMode(self.__engineMode[0])
     if self.__trackScrollCtl is not None:
         self.__trackScrollCtl.setMode(self.__engineMode)
     if BattleReplay.isPlaying() and BattleReplay.g_replayCtrl.isTimeWarpInProgress:
         return
     else:
         isOldPhysicsMode = self.__vehicle.physicsMode == VEHICLE_PHYSICS_MODE.STANDARD
         if isOldPhysicsMode and forceSwinging:
             flags = mode[1]
             prevFlags = self.__swingMoveFlags
             swingingAnimator = self.__swingingAnimator
             if swingingAnimator is not None:
                 moveMask = 3
                 rotMask = 12
                 if flags & moveMask ^ prevFlags & moveMask:
                     swingPeriod = 2.0
                     if flags & 1:
                         swingingAnimator.accelSwingingDirection = -1
                     elif flags & 2:
                         swingingAnimator.accelSwingingDirection = 1
                     else:
                         swingingAnimator.accelSwingingDirection = 0
                 elif not flags & moveMask and flags & rotMask ^ prevFlags & rotMask:
                     swingPeriod = 1.0
                     swingingAnimator.accelSwingingDirection = 0
                 else:
                     swingPeriod = 0.0
                 if swingPeriod > swingingAnimator.accelSwingingPeriod:
                     swingingAnimator.accelSwingingPeriod = swingPeriod
             self.__swingMoveFlags = flags
         return
开发者ID:aevitas,项目名称:wotsdk,代码行数:34,代码来源:vehicle_systemscompoundappearance.py

示例2: __showChatInitSuccessMessage

 def __showChatInitSuccessMessage(self):
     if GUI_SETTINGS.voiceChat and not BattleReplay.isPlaying():
         if self._VoiceChatManager__failedEventRaised and self.ready:
             self._VoiceChatManager__failedEventRaised = False
             self._VoiceChatManager__pendingMessage = None
             if self._VoiceChatManager__enterToLobby:
                 self._VoiceChatManager__showDialog('voiceChatInitSucceded')
开发者ID:Infernux,项目名称:Projects,代码行数:7,代码来源:voicechatmanager.py

示例3: __onModelsRefresh

 def __onModelsRefresh(self, modelState, resourceList):
     if BattleReplay.isFinished():
         return
     elif modelState != self.__currentDamageState.modelState:
         self.__requestModelsRefresh()
         return
     elif self.__vehicle is None:
         return
     else:
         vehicle = self.__vehicle
         newCompoundModel = resourceList[self.__typeDesc.name]
         self.deactivate(False)
         self.__compoundModel = newCompoundModel
         self.__isTurretDetached = vehicle.isTurretDetached
         if self.__currentDamageState.isCurrentModelDamaged:
             fashions = VehiclePartsTuple(None, None, None, None)
             self.swingingAnimator = None
             self.gunRecoil = None
             self.__setFashions(fashions, self.__isTurretDetached)
             self.__destroySystems()
             self.__trackFashionSet = False
         self.__setupModels()
         self.setVehicle(vehicle)
         self.activate()
         self.__reattachComponents(self.__compoundModel)
         lodLink = DataLinks.createFloatLink(self.lodCalculator, 'lodDistance')
         if not self.damageState.isCurrentModelDamaged:
             model_assembler.assembleRecoil(self, lodLink)
         model_assembler.setupTurretRotations(self)
         return
开发者ID:aevitas,项目名称:wotsdk,代码行数:30,代码来源:vehicle_systemscompoundappearance.py

示例4: __showChatInitErrorMessage

 def __showChatInitErrorMessage(self):
     if GUI_SETTINGS.voiceChat and not BattleReplay.isPlaying():
         if not self.__failedEventRaised and not self.ready:
             self.__failedEventRaised = True
             if self.__enterToLobby:
                 self.__showDialog('voiceChatInitFailed')
             else:
                 self.__pendingMessage = 'voiceChatInitFailed'
开发者ID:webiumsk,项目名称:WOT-0.9.12,代码行数:8,代码来源:voicechatmanager.py

示例5: __voiceChatEnable

 def __voiceChatEnable(self, isEnable):
     if BattleReplay.isPlaying():
         return
     elif isEnable is None:
         return
     else:
         g_settingsCore.applySetting("enableVoIP", isEnable)
         return
开发者ID:webiumsk,项目名称:WOT0.10.0,代码行数:8,代码来源:settingsinterface.py

示例6: invalidateInitialization

 def invalidateInitialization(self):
     """
     Raise the event (onVoiceChatInitFailed) only if all conditions are equal:
      1) voip is enabled
      2) a replay is not playing
      3) VOIP manager is not ready (not initialized)
     """
     if self.isVOIPEnabled() and not BattleReplay.isPlaying() and not self.isReady():
         g_messengerEvents.voip.onVoiceChatInitFailed()
开发者ID:aevitas,项目名称:wotsdk,代码行数:9,代码来源:bw_chat2voipchatcontroller.py

示例7: receiveShotImpulse

 def receiveShotImpulse(self, dir, impulse):
     if BattleReplay.isPlaying() and BattleReplay.g_replayCtrl.isTimeWarpInProgress:
         return
     else:
         if not VehicleDamageState.isDamagedModel(self.__currentDamageState.modelState):
             self.__swingingAnimator.receiveShotImpulse(dir, impulse)
             if self.__crashedTracksCtrl is not None:
                 self.__crashedTracksCtrl.receiveShotImpulse(dir, impulse)
         return
开发者ID:aevitas,项目名称:wotsdk,代码行数:9,代码来源:vehicle_systemscompoundappearance.py

示例8: hideLobby

 def hideLobby(self):
     if BattleReplay.isPlaying():
         self.__window.active(False)
     elif self.__window is not None:
         self.__window.close()
         self.__window = None
     g_windowsStoredData.stop()
     BattleReplay.g_replayCtrl.onCommonSwfUnloaded()
     return
开发者ID:krzcho,项目名称:WOTDecompiled,代码行数:9,代码来源:windowsmanager.py

示例9: _makeHash

 def _makeHash(self, index, playerFullName, vInfoVO, vStatsVO, viStatsVO, ctx, playerAccountID, inviteSendingProhibited, invitesReceivingProhibited, isEnemy):
     vehicleID = vInfoVO.vehicleID
     vTypeVO = vInfoVO.vehicleType
     playerVO = vInfoVO.player
     dbID = playerVO.accountDBID
     user = self._userGetter(dbID)
     if user:
         roster = _getRoster(user)
         isMuted = user.isMuted()
         isIgnored = user.isIgnored()
     else:
         isIgnored = False
         roster = 0
         isMuted = False
     squadIndex = ctx.getSquadIndex(vInfoVO)
     himself = ctx.isPlayerSelected(vInfoVO)
     isActionsDisabled = vInfoVO.isActionsDisabled()
     isInvitesForbidden = inviteSendingProhibited or himself or playerVO.forbidInBattleInvitations or isIgnored or isActionsDisabled
     isPlayerInSquad = playerAccountID == dbID and vInfoVO.isSquadMan()
     squadNoSound = False
     if isPlayerInSquad and isRandomBattle() and not IS_CHINA and not BattleReplay.isPlaying():
         squadNoSound = not g_settingsCore.getSetting(SOUND.VOIP_ENABLE)
     return {'position': index + 1,
      'label': playerFullName,
      'userName': playerVO.getPlayerLabel(),
      'icon': vTypeVO.iconPath,
      'vehicle': vTypeVO.shortName,
      'vehicleState': vInfoVO.vehicleStatus,
      'frags': vStatsVO.frags,
      'squad': squadIndex,
      'clanAbbrev': playerVO.clanAbbrev,
      'speaking': self._isSpeaking(dbID),
      'uid': dbID,
      'himself': himself,
      'roster': roster,
      'muted': isMuted,
      'vipKilled': 0,
      'VIP': False,
      'teamKiller': ctx.isTeamKiller(vInfoVO),
      'denunciations': ctx.denunciationsLeft,
      'isPostmortemView': ctx.isPostmortemView(vInfoVO),
      'level': vTypeVO.level if g_settingsCore.getSetting('ppShowLevels') else 0,
      'vehAction': ctx.getAction(vInfoVO),
      'team': vInfoVO.team,
      'vehId': vehicleID,
      'isIGR': playerVO.isIGR(),
      'igrType': playerVO.igrType,
      'igrLabel': playerVO.getIGRLabel(),
      'isEnabledInRoaming': self._isMenuEnabled(dbID),
      'region': self._regionGetter(dbID),
      'isPrebattleCreator': playerVO.isPrebattleCreator,
      'dynamicSquad': self._getDynamicSquadData(dbID, playerAccountID, isInSquad=squadIndex > 0, inviteSendingProhibited=isInvitesForbidden, invitesReceivingProhibited=invitesReceivingProhibited),
      'vehicleType': vTypeVO.getClassName(),
      'teamColorScheme': 'vm_enemy' if isEnemy else 'vm_ally',
      'vLevel': vTypeVO.level,
      'contextMenuDisabled': isActionsDisabled or self._isReplayPlaying,
      'squadNoSound': squadNoSound}
开发者ID:webiumsk,项目名称:WOT-0.9.14-CT,代码行数:57,代码来源:battle_arena_ctrl.py

示例10: Vehicle_onEnterWorld

def Vehicle_onEnterWorld(self, prereqs):
    if self.isPlayerVehicle and config.get('damageLog/enabled'):
        global on_fire, damageLogConfig, autoReloadConfig
        data.isReplay = BattleReplay.isPlaying()
        autoReloadConfig = config.get('autoReloadConfig')
        if not (autoReloadConfig or damageLogConfig):
            for section in SECTIONS:
                damageLogConfig[section] = readyConfig(section)
        on_fire = 0
        data.data['oldHealth'] = self.health
        data.data['maxHealth'] = self.health
开发者ID:peterbartha,项目名称:ImmunoMod,代码行数:11,代码来源:damageLog.py

示例11: __voiceChatEnable

 def __voiceChatEnable(self, isEnable):
     if BattleReplay.isPlaying():
         return 
     if isEnable is None:
         return 
     preveVoIP = Settings.g_instance.userPrefs.readBool(Settings.KEY_ENABLE_VOIP)
     import VOIP
     if preveVoIP != isEnable:
         VOIP.getVOIPManager().enable(isEnable)
         Settings.g_instance.userPrefs.writeBool(Settings.KEY_ENABLE_VOIP, bool(isEnable))
         LOG_NOTE('Change state of voip: %s' % str(isEnable))
开发者ID:Infernux,项目名称:Projects,代码行数:11,代码来源:settingsinterface.py

示例12: showHittingArea

 def showHittingArea(self, equipmentID, pos, dir, time):
     if _ENABLE_DEBUG_LOG:
         LOG_DEBUG("===== showHittingArea =====")
         LOG_DEBUG(equipmentID)
         LOG_DEBUG(pos, dir, time)
     correctedCoords = tuple((int(x * 1000.0) for x in pos.tuple()))
     areaUID = (int(equipmentID), correctedCoords)
     if areaUID in self.__selectedAreas:
         return
     eq = vehicles.g_cache.equipments()[equipmentID]
     if BattleReplay.isPlaying():
         BigWorld.callback(0.0, functools.partial(self.__showMarkerCallback, eq, pos, dir, time, areaUID))
     else:
         self.__showMarkerCallback(eq, pos, dir, time, areaUID)
开发者ID:webiumsk,项目名称:WOT0.10.0,代码行数:14,代码来源:combatequipmentmanager.py

示例13: __voiceChatEnable

 def __voiceChatEnable(self, isEnable):
     if BattleReplay.isPlaying():
         return
     if isEnable is None:
         return
     preveVoIP = Settings.g_instance.userPrefs.readBool(Settings.KEY_ENABLE_VOIP)
     import VOIP
     if preveVoIP != isEnable:
         VOIP.getVOIPManager().enable(isEnable)
         Settings.g_instance.userPrefs.writeBool(Settings.KEY_ENABLE_VOIP, bool(isEnable))
         from gui.WindowsManager import g_windowsManager
         if g_windowsManager.battleWindow is not None and not isEnable:
             g_windowsManager.battleWindow.speakingPlayersReset()
         LOG_NOTE('Change state of voip: %s' % str(isEnable))
开发者ID:wotmods,项目名称:WOTDecompiled,代码行数:14,代码来源:settingsinterface.py

示例14: applySettings

 def applySettings(self):
     if not BattleReplay.isPlaying():
         yield self._updateToVersion()
     self._core.options.refresh()
     enableDynamicCamera = self._core.options.getSetting(self.GAME.DYNAMIC_CAMERA)
     enableDynamicCameraValue = enableDynamicCamera.get()
     enableSniperStabilization = self._core.options.getSetting(self.GAME.SNIPER_MODE_STABILIZATION)
     enableSniperStabilizationValue = enableSniperStabilization.get()
     from AvatarInputHandler import AvatarInputHandler
     AvatarInputHandler.enableDynamicCamera(enableDynamicCameraValue, enableSniperStabilizationValue)
     from messenger.doc_loaders import user_prefs
     from messenger import g_settings as messenger_settings
     user_prefs.loadFromServer(messenger_settings)
     self._core.storages.get('FOV').apply(False, True)
开发者ID:webiumsk,项目名称:WoT,代码行数:14,代码来源:serversettingsmanager.py

示例15: _dispose

 def _dispose(self):
     Waiting.close()
     g_sessionProvider.removeArenaCtrl(self)
     if not BattleReplay.isPlaying():
         BigWorld.wg_enableGUIBackground(False, True)
     super(BattleLoading, self)._dispose()
开发者ID:webiumsk,项目名称:WOT-0.9.14-CT,代码行数:6,代码来源:battle_loading.py


注:本文中的BattleReplay类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。