本文整理汇总了Python中toontown.toon.ToonDNA.getHeadList方法的典型用法代码示例。如果您正苦于以下问题:Python ToonDNA.getHeadList方法的具体用法?Python ToonDNA.getHeadList怎么用?Python ToonDNA.getHeadList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.toon.ToonDNA
的用法示例。
在下文中一共展示了ToonDNA.getHeadList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __swapSpecies
# 需要导入模块: from toontown.toon import ToonDNA [as 别名]
# 或者: from toontown.toon.ToonDNA import getHeadList [as 别名]
def __swapSpecies(self, offset):
length = len(ToonDNA.toonSpeciesTypes)
self.speciesChoice = (self.speciesChoice + offset) % length
self.__updateScrollButtons(self.speciesChoice, length, self.speciesStart, self.speciesLButton, self.speciesRButton)
self.species = ToonDNA.toonSpeciesTypes[self.speciesChoice]
self.headList = ToonDNA.getHeadList(self.species)
self.__changeSpeciesName(self.species)
maxHeadChoice = len(self.headList) - 1
if self.headChoice > maxHeadChoice:
self.headChoice = maxHeadChoice
self.__updateHead()
示例2: __init__
# 需要导入模块: from toontown.toon import ToonDNA [as 别名]
# 或者: from toontown.toon.ToonDNA import getHeadList [as 别名]
def __init__(self, serverVersion, launcher = None):
OTPClientRepository.OTPClientRepository.__init__(self, serverVersion, launcher, playGame=PlayGame.PlayGame)
self._playerAvDclass = self.dclassesByName['DistributedToon']
setInterfaceFont(TTLocalizer.InterfaceFont)
setSignFont(TTLocalizer.SignFont)
setFancyFont(TTLocalizer.FancyFont)
nameTagFontIndex = 0
for font in TTLocalizer.NametagFonts:
setNametagFont(nameTagFontIndex, TTLocalizer.NametagFonts[nameTagFontIndex])
nameTagFontIndex += 1
self.toons = {}
if self.http.getVerifySsl() != HTTPClient.VSNoVerify:
self.http.setVerifySsl(HTTPClient.VSNoDateCheck)
prepareAvatar(self.http)
self.__forbidCheesyEffects = 0
self.friendManager = None
self.speedchatRelay = None
self.trophyManager = None
self.bankManager = None
self.catalogManager = None
self.welcomeValleyManager = None
self.newsManager = None
self.streetSign = None
self.distributedDistrict = None
self.partyManager = None
self.inGameNewsMgr = None
self.whitelistMgr = None
self.toontownTimeManager = ToontownTimeManager.ToontownTimeManager()
self.avatarFriendsManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_AVATAR_FRIENDS_MANAGER, 'AvatarFriendsManager')
self.playerFriendsManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_PLAYER_FRIENDS_MANAGER, 'TTPlayerFriendsManager')
self.speedchatRelay = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_TOONTOWN_SPEEDCHAT_RELAY, 'TTSpeedchatRelay')
self.deliveryManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_TOONTOWN_DELIVERY_MANAGER, 'DistributedDeliveryManager')
if config.GetBool('want-code-redemption', 1):
self.codeRedemptionManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_TOONTOWN_CODE_REDEMPTION_MANAGER, 'TTCodeRedemptionMgr')
self.streetSign = None
self.furnitureManager = None
self.objectManager = None
self.friendsMap = {}
self.friendsOnline = {}
self.friendsMapPending = 0
self.friendsListError = 0
self.friendPendingChatSettings = {}
self.elderFriendsMap = {}
self.__queryAvatarMap = {}
self.dateObject = DateObject.DateObject()
self.accountServerDate = AccountServerDate.AccountServerDate()
self.hoodMgr = HoodMgr.HoodMgr(self)
self.setZonesEmulated = 0
self.old_setzone_interest_handle = None
self.setZoneQueue = Queue()
self.accept(ToontownClientRepository.SetZoneDoneEvent, self._handleEmuSetZoneDone)
self._deletedSubShardDoIds = set()
self.toonNameDict = {}
self.gameFSM.addState(State.State('skipTutorialRequest', self.enterSkipTutorialRequest, self.exitSkipTutorialRequest, ['playGame', 'gameOff', 'tutorialQuestion']))
state = self.gameFSM.getStateNamed('waitOnEnterResponses')
state.addTransition('skipTutorialRequest')
state = self.gameFSM.getStateNamed('playGame')
state.addTransition('skipTutorialRequest')
self.wantCogdominiums = base.config.GetBool('want-cogdominiums', 1)
self.wantEmblems = base.config.GetBool('want-emblems', 0)
if base.config.GetBool('tt-node-check', 0):
for species in ToonDNA.toonSpeciesTypes:
for head in ToonDNA.getHeadList(species):
for torso in ToonDNA.toonTorsoTypes:
for legs in ToonDNA.toonLegTypes:
for gender in ('m', 'f'):
print 'species: %s, head: %s, torso: %s, legs: %s, gender: %s' % (species,
head,
torso,
legs,
gender)
dna = ToonDNA.ToonDNA()
dna.newToon((head,
torso,
legs,
gender))
toon = Toon.Toon()
try:
toon.setDNA(dna)
except Exception as e:
print e
return
示例3: __swapHead
# 需要导入模块: from toontown.toon import ToonDNA [as 别名]
# 或者: from toontown.toon.ToonDNA import getHeadList [as 别名]
def __swapHead(self, offset):
self.headList = ToonDNA.getHeadList(self.species)
length = len(self.headList)
self.headChoice = (self.headChoice + offset) % length
self.__updateHead()