本文整理汇总了Python中toontown.nametag.NametagGlobals类的典型用法代码示例。如果您正苦于以下问题:Python NametagGlobals类的具体用法?Python NametagGlobals怎么用?Python NametagGlobals使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了NametagGlobals类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: commence
def commence(self=self):
NametagGlobals.setWant2dNametags(True)
self.fsm.request(requestStatus["how"], [requestStatus])
base.playMusic(self.music, looping=1, volume=0.8)
base.transitions.irisIn()
stage = bboard.get(DistributedStage.DistributedStage.ReadyPost)
self.loader.hood.spawnTitleText(stage.stageId)
示例2: exitReward
def exitReward(self):
self.notify.info('exitReward()')
self.clearInterval(self.uniqueName('floorReward'))
self._removeMembersKeep()
NametagGlobals.setWant2dNametags(True)
for toon in self.toons:
toon.startSmooth()
示例3: exit
def exit(self):
if not self.entered:
return
self.entered = 0
messenger.send('stickerBookExited')
base.playSfx(self.closeSound)
self.pages[self.currPageIndex].exit()
base.render.show()
setBlackBackground = 0
for obj in base.cr.doId2do.values():
if isinstance(obj, DistributedFireworkShow.DistributedFireworkShow) or isinstance(obj, DistributedPartyFireworksActivity.DistributedPartyFireworksActivity):
setBlackBackground = 1
if setBlackBackground:
base.setBackgroundColor(Vec4(0, 0, 0, 1))
else:
base.setBackgroundColor(ToontownGlobals.DefaultBackgroundColor)
gsg = base.win.getGsg()
if gsg:
base.render.prepareScene(gsg)
base.setCellsActive([base.rightCells[0]], 1)
NametagGlobals.setForce2dNametags(False)
NametagGlobals.setForceOnscreenChat(False)
self.__isOpen = 0
self.hide()
self.hideButton()
cleanupDialog('globalDialog')
self.pageTabFrame.hide()
self.ignore('shtiker-page-done')
self.ignore(ToontownGlobals.StickerBookHotkey)
self.ignore(ToontownGlobals.OptionsPageHotkey)
self.ignore('arrow_right')
self.ignore('arrow_left')
if base.config.GetBool('want-qa-regression', 0):
self.notify.info('QA-REGRESSION: SHTICKERBOOK: Close')
示例4: exit
def exit(self):
self.ignoreAll()
messenger.send('exitToonInterior')
self._telemLimiter.destroy()
del self._telemLimiter
NametagGlobals.setWant2dNametags(False)
self.loader.activityMusic.stop()
示例5: enter
def enter(self):
if base.config.GetBool('want-qa-regression', 0):
self.notify.info('QA-REGRESSION: SHTICKERBOOK: Open')
if self.entered:
return
self.entered = 1
messenger.send('releaseDirector')
messenger.send('stickerBookEntered')
base.playSfx(self.openSound)
base.disableMouse()
base.render.hide()
base.setBackgroundColor(0.05, 0.15, 0.4)
base.setCellsActive([base.rightCells[0]], 0)
NametagGlobals.setForce2dNametags(True)
NametagGlobals.setForceOnscreenChat(True)
self.__isOpen = 1
self.__setButtonVisibility()
self.show()
self.showPageArrows()
if not self.safeMode:
self.accept('shtiker-page-done', self.__pageDone)
self.accept(ToontownGlobals.StickerBookHotkey, self.__close)
self.accept(ToontownGlobals.OptionsPageHotkey, self.__close)
self.pageTabFrame.show()
self.pages[self.currPageIndex].enter()
if hasattr(localAvatar, 'newsButtonMgr') and localAvatar.newsButtonMgr:
localAvatar.newsButtonMgr.hideNewIssueButton()
示例6: enterControlled
def enterControlled(self, avId):
self.avId = avId
self.toon = base.cr.doId2do.get(avId, None)
if self.toon:
self.toon.stopSmooth()
self.toon.stopPosHprBroadcast()
for feet in self.toon.getPieces(('legs', 'feet')):
feet.hide()
self.toon.reparentTo(self.toonSeat)
self.toon.dropShadow.hide()
self.notify.debug('setting pos of toon%s' % self.toon.doId)
self.toon.setPosHpr(0, 0, 0, 0, 0, 0)
self.toon.loop('sit')
if self.toon.doId == localAvatar.doId:
self.notify.debug('calling send currentPosition')
self.toon.sendCurrentPosition()
self.doHeadScale(self.toon, 1.75)
self.toon.setShear(0, 0, 0)
NametagGlobals.setForceOnscreenChat(True)
if self.localVehicle:
camera.reparentTo(self.cameraNode)
camera.setPosHpr(0, -33, 16, 0, -10, 0)
self.physicsMgr.attachPhysicalNode(self.node())
self.__enableControlInterface()
self.__createPieWindshield()
self.startPosHprBroadcast()
self.engineSfxTrack = self.generateEngineStartTrack()
self.engineSfxTrack.start()
else:
self.startSmooth()
taskName = 'updateNonlocalVehicle-%s' % avId
self.updateNonLocalTask = taskMgr.add(self.__updateNonlocalVehicle, taskName)
return
示例7: exitReward
def exitReward(self):
self.ignore('clientCleanup')
taskMgr.remove('countUpTask')
taskMgr.remove('countDownTask')
taskMgr.remove('celebrate')
taskMgr.remove('purchase-trans')
taskMgr.remove('delayAdd')
taskMgr.remove('delaySubtract')
for toon in self.toons:
toon.detachNode()
del self.toons
if hasattr(self, 'toonsKeep'):
for delayDelete in self.toonsKeep:
delayDelete.destroy()
del self.toonsKeep
for counter in self.counters:
counter.reparentTo(hidden)
for total in self.totalCounters:
total.reparentTo(hidden)
self.foreground.reparentTo(hidden)
self.backgroundL.reparentTo(hidden)
self.backgroundR.reparentTo(hidden)
self.sidewalk.reparentTo(hidden)
self.sidewalkL.reparentTo(hidden)
self.sidewalkR.reparentTo(hidden)
self.door.reparentTo(hidden)
self.title.reparentTo(self.frame)
self.rewardDoubledJellybeanLabel.hide()
base.camLens.setMinFov(ToontownGlobals.DefaultCameraFov/(4./3.))
NametagGlobals.setForceOnscreenChat(False)
示例8: commence
def commence(self = self):
NametagGlobals.setWant2dNametags(True)
self.fsm.request(requestStatus['how'], [requestStatus])
base.playMusic(self.music, looping=1, volume=0.8)
base.transitions.irisIn()
mint = bboard.get(DistributedMint.DistributedMint.ReadyPost)
self.loader.hood.spawnTitleText(mint.mintId, mint.floorNum)
示例9: exitFLM
def exitFLM(self):
self.notify.debug('FriendsListManager: exitFLM()')
if self._preserveFriendsList:
return
if not self._entered:
return
self._entered = False
self.ignore('openFriendsList')
self.ignore('clickedNametag')
self.ignore('clickedNametagPlayer')
base.localAvatar.setFriendsListButtonActive(0)
NametagGlobals.setWantActiveNametags(False)
if self.avatarPanel:
self.avatarPanel.cleanup()
self.avatarPanel = None
self.ignore('gotoAvatar')
self.ignore('friendAvatar')
self.ignore('avatarDetails')
self.ignore('playerDetails')
FriendsListPanel.hideFriendsList()
ToontownFriendSecret.hideFriendSecret()
if base.cr.friendManager:
base.cr.friendManager.setAvailable(0)
self.ignore('friendInvitation')
FriendInviter.hideFriendInviter()
ToonAvatarDetailPanel.hideAvatarDetail()
ToonTeleportPanel.hideTeleportPanel()
return
示例10: exitReward
def exitReward(self):
self.notify.debug('exitReward()')
self.ignore('resumeAfterReward')
self.movie.resetReward(finish=1)
self._removeMembersKeep()
NametagGlobals.setWant2dNametags(True)
Emote.globalEmote.releaseAll(base.localAvatar, 'dbattle, exitReward')
示例11: exitControlled
def exitControlled(self):
if self.localVehicle:
self.stopPosHprBroadcast()
self.__disableControlInterface()
self.physicsMgr.removePhysicalNode(self.node())
self.cleanupParticles()
camera.reparentTo(localAvatar)
camera.setPos(localAvatar.cameraPositions[0][0])
camera.setHpr(0, 0, 0)
self.engineSfxTrack.finish()
self.engineSfxTrack = self.generateEngineStopTrack()
else:
self.stopSmooth()
taskMgr.remove(self.updateNonLocalTask)
if self.toon and not self.toon.isDisabled() and not self.toon.isEmpty():
self.toon.dropShadow.show()
self.doHeadScale(self.toon, None)
self.toon.setPosHpr(self.geom[0], 0, 8, 0, 0, 0, 0)
for feet in self.toon.getPieces(('legs', 'feet')):
feet.show()
self.toon.reparentTo(render)
self.toon.loop('neutral')
self.toon.startSmooth()
NametagGlobals.setForceOnscreenChat(False)
base.camLens.setMinFov(ToontownGlobals.DefaultCameraFov/(4./3.))
return
示例12: __unmakeGui
def __unmakeGui(self):
self.notify.debug('__unmakeGui')
if not self.madeGui:
return
if self.flashingLabel:
self.flashingLabel.finish()
self.flashingLabel = None
NametagGlobals.setWant2dNametags(True)
self.__disableAimInterface()
self.upButton.unbind(DGG.B1PRESS)
self.upButton.unbind(DGG.B1RELEASE)
self.downButton.unbind(DGG.B1PRESS)
self.downButton.unbind(DGG.B1RELEASE)
self.leftButton.unbind(DGG.B1PRESS)
self.leftButton.unbind(DGG.B1RELEASE)
self.rightButton.unbind(DGG.B1PRESS)
self.rightButton.unbind(DGG.B1RELEASE)
self.aimPad.destroy()
del self.aimPad
del self.fireButton
del self.upButton
del self.downButton
del self.leftButton
del self.rightButton
self.madeGui = 0
return
示例13: enterBattleFour
def enterBattleFour(self):
self.cleanupIntervals()
self.releaseToons(finalBattle=1)
self.accept('clickedNametag', self.__clickedNameTag)
self.accept('friendAvatar', self.__handleFriendAvatar)
self.accept('avatarDetails', self.__handleAvatarDetails)
NametagGlobals.setWant2dNametags(False)
NametagGlobals.setWantActiveNametags(True)
示例14: exitIntroduction
def exitIntroduction(self):
self.notify.debug('DistributedBossCog.exitIntroduction:')
intervalName = 'IntroductionMovie'
self.clearInterval(intervalName)
self.unstickToons()
self.releaseToons()
NametagGlobals.setWant2dNametags(True)
ElevatorUtils.closeDoors(self.leftDoor, self.rightDoor, self.elevatorType)
示例15: exit
def exit(self):
if self.isEntered == 0:
return
self.isEntered = 0
NametagGlobals.setForceOnscreenChat(False)
self.__cleanupFirstPage()
self.ignoreAll()
self.accept("clientCleanup", self.unload)
self.hide()