本文整理匯總了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()