本文整理汇总了Python中ArenaType.getGameplayName方法的典型用法代码示例。如果您正苦于以下问题:Python ArenaType.getGameplayName方法的具体用法?Python ArenaType.getGameplayName怎么用?Python ArenaType.getGameplayName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ArenaType
的用法示例。
在下文中一共展示了ArenaType.getGameplayName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: onClientReady
# 需要导入模块: import ArenaType [as 别名]
# 或者: from ArenaType import getGameplayName [as 别名]
def onClientReady(self):
if not (self.isPlaying or self.isRecording):
return
elif self.isRecording and BigWorld.player().arena.guiType == constants.ARENA_GUI_TYPE.TUTORIAL:
self.stop(None, True)
return
else:
self.__replayCtrl.playerVehicleID = BigWorld.player().playerVehicleID
self.__replayCtrl.onClientReady()
if self.isPlaying:
AreaDestructibles.g_destructiblesManager.onAfterReplayTimeWarp()
if isPlayerAvatar():
BigWorld.player().onVehicleEnterWorld += self.__onVehicleEnterWorld
if self.isRecording:
player = BigWorld.player()
arena = player.arena
arenaName = arena.arenaType.geometry
i = arenaName.find('/')
if i != -1:
arenaName = arenaName[i + 1:]
now = datetime.datetime.now()
now = '%02d.%02d.%04d %02d:%02d:%02d' % (now.day,
now.month,
now.year,
now.hour,
now.minute,
now.second)
vehicleName = BigWorld.entities[player.playerVehicleID].typeDescriptor.name
vehicleName = vehicleName.replace(':', '-')
vehicles = self.__getArenaVehiclesInfo()
gameplayID = player.arenaTypeID >> 16
clientVersionFromXml = getFullClientVersion()
clientVersionFromExe = BigWorld.wg_getProductVersion()
arenaInfo = {'dateTime': now,
'playerName': player.name,
'playerID': self.__playerDatabaseID,
'playerVehicle': vehicleName,
'mapName': arenaName,
'mapDisplayName': arena.arenaType.name,
'gameplayID': ArenaType.getGameplayName(gameplayID) or gameplayID,
'vehicles': vehicles,
'battleType': arena.bonusType,
'clientVersionFromExe': clientVersionFromExe,
'clientVersionFromXml': clientVersionFromXml,
'serverName': connectionManager.serverUserName,
'regionCode': constants.AUTH_REALM,
'serverSettings': self.__serverSettings}
self.__replayCtrl.recMapName = arenaName
self.__replayCtrl.recPlayerVehicleName = vehicleName
self.__replayCtrl.setArenaInfoStr(json.dumps(arenaInfo))
else:
self.__showInfoMessage('replayControlsHelp1')
self.__showInfoMessage('replayControlsHelp2')
self.__showInfoMessage('replayControlsHelp3')
if self.replayTimeout > 0:
LOG_DEBUG('replayTimeout set for %.2f' % float(self.replayTimeout))
BigWorld.callback(float(self.replayTimeout), BigWorld.quit)
return
示例2: onClientReady
# 需要导入模块: import ArenaType [as 别名]
# 或者: from ArenaType import getGameplayName [as 别名]
def onClientReady(self):
if not (self.isPlaying or self.isRecording):
return
if self.isRecording and BigWorld.player().arena.guiType == constants.ARENA_GUI_TYPE.TUTORIAL:
self.stop()
return
self.__replayCtrl.playerVehicleID = BigWorld.player().playerVehicleID
self.__replayCtrl.onClientReady()
if self.isRecording:
player = BigWorld.player()
arena = player.arena
arenaName = arena.arenaType.geometry
i = arenaName.find('/')
if i != -1:
arenaName = arenaName[i + 1:]
now = datetime.datetime.now()
now = '%02d.%02d.%04d %02d:%02d:%02d' % (now.day,
now.month,
now.year,
now.hour,
now.minute,
now.second)
vehicleName = BigWorld.entities[player.playerVehicleID].typeDescriptor.name
vehicleName = vehicleName.replace(':', '-')
vehicles = self.__getArenaVehiclesInfo()
gameplayID = player.arenaTypeID >> 16
sec = ResMgr.openSection(VERSION_FILE_PATH)
clientVersionFromXml = i18n.makeString(sec.readString('appname')) + ' ' + sec.readString('version')
clientVersionFromExe = BigWorld.wg_getProductVersion()
arenaInfo = {'dateTime': now,
'playerName': player.name,
'playerID': self.__playerDatabaseID,
'playerVehicle': vehicleName,
'mapName': arenaName,
'mapDisplayName': arena.arenaType.name,
'gameplayID': ArenaType.getGameplayName(gameplayID) or gameplayID,
'vehicles': vehicles,
'battleType': arena.bonusType,
'clientVersionFromExe': clientVersionFromExe,
'clientVersionFromXml': clientVersionFromXml,
'serverName': connectionManager.serverUserName,
'regionCode': constants.AUTH_REALM,
'roamingSettings': self.__roamingSettings}
self.__replayCtrl.recMapName = arenaName
self.__replayCtrl.recPlayerVehicleName = vehicleName
self.__replayCtrl.setArenaInfoStr(json.dumps(arenaInfo))
else:
self.isPlaying = True
self.__enableTimeWarp = True
currReplayTime = self.__replayCtrl.getTimeMark(REPLAY_TIME_MARK_CURRENT_TIME)
self.__timeWarp(currReplayTime + 30.0)
self.triggerRecord()
self.__disableSidePanelContextMenu()
示例3: onClientReady
# 需要导入模块: import ArenaType [as 别名]
# 或者: from ArenaType import getGameplayName [as 别名]
def onClientReady(self):
if not self.isPlaying:
if not self.isRecording:
return
if self.isRecording and BigWorld.player().arena.guiType == constants.ARENA_GUI_TYPE.TUTORIAL:
self.stop()
return
self.__replayCtrl.playerVehicleID = BigWorld.player().playerVehicleID
self.__replayCtrl.onClientReady()
if self.isRecording:
player = BigWorld.player()
arena = player.arena
arenaName = arena.arenaType.geometry
i = arenaName.find('/')
arenaName = i != -1 and arenaName[i + 1:]
now = datetime.datetime.now()
now = '%02d.%02d.%04d %02d:%02d:%02d' % (now.day,
now.month,
now.year,
now.hour,
now.minute,
now.second)
vehicleName = BigWorld.entities[player.playerVehicleID].typeDescriptor.name
vehicleName = vehicleName.replace(':', '-')
vehicles = self.__getArenaVehiclesInfo()
gameplayID = player.arenaTypeID >> 16
sec = ResMgr.openSection(VERSION_FILE_PATH)
clientVersionFromXml = i18n.makeString(sec.readString('appname')) + ' ' + sec.readString('version')
clientVersionFromExe = BigWorld.wg_getProductVersion()
arenaInfo = {'dateTime': now,
'playerName': player.name,
'playerID': self.__playerDatabaseID,
'playerVehicle': vehicleName,
'mapName': arenaName,
'mapDisplayName': arena.arenaType.name,
'gameplayID': ArenaType.getGameplayName(gameplayID) or gameplayID,
'vehicles': vehicles,
'battleType': arena.bonusType,
'clientVersionFromExe': clientVersionFromExe,
'clientVersionFromXml': clientVersionFromXml}
self.__replayCtrl.recMapName = arenaName
self.__replayCtrl.recPlayerVehicleName = vehicleName
self.__replayCtrl.setArenaInfoStr(json.dumps(arenaInfo))
else:
self.__showInfoMessage('replayControlsHelp1')
self.__showInfoMessage('replayControlsHelp2')
self.__showInfoMessage('replayControlsHelp3')
self.__disableSidePanelContextMenu()