本文整理汇总了Python中toontown.nametag.NametagGlobals.setForceOnscreenChat方法的典型用法代码示例。如果您正苦于以下问题:Python NametagGlobals.setForceOnscreenChat方法的具体用法?Python NametagGlobals.setForceOnscreenChat怎么用?Python NametagGlobals.setForceOnscreenChat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.nametag.NametagGlobals
的用法示例。
在下文中一共展示了NametagGlobals.setForceOnscreenChat方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: enterControlled
# 需要导入模块: from toontown.nametag import NametagGlobals [as 别名]
# 或者: from toontown.nametag.NametagGlobals import setForceOnscreenChat [as 别名]
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
示例2: exitControlled
# 需要导入模块: from toontown.nametag import NametagGlobals [as 别名]
# 或者: from toontown.nametag.NametagGlobals import setForceOnscreenChat [as 别名]
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
示例3: exit
# 需要导入模块: from toontown.nametag import NametagGlobals [as 别名]
# 或者: from toontown.nametag.NametagGlobals import setForceOnscreenChat [as 别名]
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: enter
# 需要导入模块: from toontown.nametag import NametagGlobals [as 别名]
# 或者: from toontown.nametag.NametagGlobals import setForceOnscreenChat [as 别名]
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()
示例5: exitReward
# 需要导入模块: from toontown.nametag import NametagGlobals [as 别名]
# 或者: from toontown.nametag.NametagGlobals import setForceOnscreenChat [as 别名]
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)
示例6: exit
# 需要导入模块: from toontown.nametag import NametagGlobals [as 别名]
# 或者: from toontown.nametag.NametagGlobals import setForceOnscreenChat [as 别名]
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()
示例7: __enableControlInterface
# 需要导入模块: from toontown.nametag import NametagGlobals [as 别名]
# 或者: from toontown.nametag.NametagGlobals import setForceOnscreenChat [as 别名]
def __enableControlInterface(self):
gui = loader.loadModel('phase_3.5/models/gui/avatar_panel_gui')
self.accept('control', self.__controlPressed)
self.accept('control-up', self.__controlReleased)
self.accept('InputState-forward', self.__upArrow)
self.accept('InputState-reverse', self.__downArrow)
self.accept('InputState-turnLeft', self.__leftArrow)
self.accept('InputState-turnRight', self.__rightArrow)
taskMgr.add(self.__watchControls, 'watchCraneControls')
taskMgr.doMethodLater(5, self.__displayCraneAdvice, self.craneAdviceName)
taskMgr.doMethodLater(10, self.__displayMagnetAdvice, self.magnetAdviceName)
NametagGlobals.setForceOnscreenChat(True)
self.arrowVert = 0
self.arrowHorz = 0
示例8: __disableControlInterface
# 需要导入模块: from toontown.nametag import NametagGlobals [as 别名]
# 或者: from toontown.nametag.NametagGlobals import setForceOnscreenChat [as 别名]
def __disableControlInterface(self):
self.__turnOffMagnet()
self.__cleanupCraneAdvice()
self.__cleanupMagnetAdvice()
self.ignore('escape')
self.ignore('control')
self.ignore('control-up')
self.ignore('InputState-forward')
self.ignore('InputState-reverse')
self.ignore('InputState-turnLeft')
self.ignore('InputState-turnRight')
self.arrowVert = 0
self.arrowHorz = 0
NametagGlobals.setForceOnscreenChat(False)
taskMgr.remove('watchCraneControls')
self.__setMoveSound(None)
return
示例9: enter
# 需要导入模块: from toontown.nametag import NametagGlobals [as 别名]
# 或者: from toontown.nametag.NametagGlobals import setForceOnscreenChat [as 别名]
def enter(self):
if self.isEntered == 1:
return
self.isEntered = 1
if self.isLoaded == 0:
self.load()
self.show()
self.introText.show()
self.getSecret.show()
self.enterSecretText.show()
self.enterSecret.show()
self.ok1.show()
self.ok2.hide()
self.cancel.hide()
self.nextText.hide()
self.secretText.hide()
base.localAvatar.chatMgr.fsm.request("otherDialog")
self.enterSecret["focus"] = 1
NametagGlobals.setForceOnscreenChat(True)
示例10: __enableControlInterface
# 需要导入模块: from toontown.nametag import NametagGlobals [as 别名]
# 或者: from toontown.nametag.NametagGlobals import setForceOnscreenChat [as 别名]
def __enableControlInterface(self):
gui = loader.loadModel('phase_3.5/models/gui/avatar_panel_gui')
self.closeButton = DirectButton(
parent=base.a2dBottomRight,
image=(gui.find('**/CloseBtn_UP'), gui.find('**/CloseBtn_DN'),
gui.find('**/CloseBtn_Rllvr'), gui.find('**/CloseBtn_UP')),
relief=None, scale=2, text=TTLocalizer.CashbotCraneLeave, text_scale=0.04,
text_pos=(0, -0.07), text_fg=VBase4(1, 1, 1, 1), pos=(-0.25, 0, 0.175),
command=self.__exitCrane)
self.accept('escape', self.__exitCrane)
self.accept(base.JUMP, self.__controlPressed)
self.accept(base.JUMP + '-up', self.__controlReleased)
self.accept('InputState-forward', self.__upArrow)
self.accept('InputState-reverse', self.__downArrow)
self.accept('InputState-turnLeft', self.__leftArrow)
self.accept('InputState-turnRight', self.__rightArrow)
taskMgr.add(self.__watchControls, 'watchCraneControls')
taskMgr.doMethodLater(5, self.__displayCraneAdvice, self.craneAdviceName)
taskMgr.doMethodLater(10, self.__displayMagnetAdvice, self.magnetAdviceName)
NametagGlobals.setForceOnscreenChat(True)
self.arrowVert = 0
self.arrowHorz = 0
return
示例11: enterReward
# 需要导入模块: from toontown.nametag import NametagGlobals [as 别名]
# 或者: from toontown.nametag.NametagGlobals import setForceOnscreenChat [as 别名]
def enterReward(self):
numToons = 0
toonLayouts = ((2,),
(1, 3),
(0, 2, 4),
(0, 1, 3, 4))
toonPositions = (5.0,
1.75,
-0.25,
-1.75,
-5.0)
self.toons = []
self.toonsKeep = []
self.counters = []
self.totalCounters = []
camera.reparentTo(render)
camera.setPos(0, 16.0, 2.0)
camera.lookAt(0, 0, 0.75)
base.transitions.irisIn(0.4)
base.camLens.setMinFov(60/(4./3.))
base.setBackgroundColor(Vec4(0, 0.6, 1, 1))
self.title.reparentTo(aspect2d)
self.foreground.reparentTo(render)
self.backgroundL.reparentTo(render)
self.backgroundR.reparentTo(render)
self.sidewalk.reparentTo(render)
self.sidewalkL.reparentTo(render)
self.sidewalkR.reparentTo(render)
self.door.reparentTo(render)
size = 20
z = -2.5
floor = CollisionPolygon(Point3(-size, -size, z), Point3(size, -size, z), Point3(size, size, z), Point3(-size, size, z))
floor.setTangible(1)
floorNode = CollisionNode('collision_floor')
floorNode.addSolid(floor)
self.collisionFloor = render.attachNewNode(floorNode)
NametagGlobals.setForceOnscreenChat(True)
for index in xrange(len(self.ids)):
avId = self.ids[index]
if self.states[index] != PURCHASE_NO_CLIENT_STATE and self.states[index] != PURCHASE_DISCONNECTED_STATE and avId in base.cr.doId2do:
numToons += 1
toon = base.cr.doId2do[avId]
toon.stopSmooth()
self.toons.append(toon)
self.toonsKeep.append(DelayDelete.DelayDelete(toon, 'Purchase.enterReward'))
counter = DirectLabel(parent=hidden, relief=None, pos=(0.0, 0.0, 0.0), text=str(0), text_scale=0.2, text_fg=(0.95, 0.95, 0, 1), text_pos=(0, -0.1, 0), text_font=ToontownGlobals.getSignFont())
counter['image'] = DGG.getDefaultDialogGeom()
counter['image_scale'] = (0.33, 1, 0.33)
counter.setScale(0.5)
counter.count = 0
counter.max = self.pointsArray[index]
self.counters.append(counter)
money = self.playerMoney[index]
totalCounter = DirectLabel(parent=hidden, relief=None, pos=(0.0, 0.0, 0.0), text=str(money), text_scale=0.2, text_fg=(0.95, 0.95, 0, 1), text_pos=(0, -0.1, 0), text_font=ToontownGlobals.getSignFont(), image=self.jarImage)
totalCounter.setScale(0.5)
totalCounter.count = money
totalCounter.max = toon.getMaxMoney()
self.totalCounters.append(totalCounter)
self.accept('clientCleanup', self._handleClientCleanup)
pos = 0
toonLayout = toonLayouts[numToons - 1]
for toon in self.toons:
thisPos = toonPositions[toonLayout[pos]]
toon.setPos(Vec3(thisPos, 1.0, -2.5))
toon.setHpr(Vec3(0, 0, 0))
toon.setAnimState('neutral', 1)
toon.setShadowHeight(0)
if not toon.isDisabled():
toon.reparentTo(render)
self.counters[pos].setPos(thisPos * -0.17, 0, toon.getHeight() / 10 + 0.25)
self.counters[pos].reparentTo(aspect2d)
self.totalCounters[pos].setPos(thisPos * -0.17, 0, -0.825)
self.totalCounters[pos].reparentTo(aspect2d)
pos += 1
self.maxPoints = max(self.pointsArray)
if self.votesArray:
self.maxVotes = max(self.votesArray)
numToons = len(self.toons)
self.voteMultiplier = TravelGameGlobals.PercentOfVotesConverted[numToons] / 100.0
self.maxBeansFromVotes = int(self.voteMultiplier * self.maxVotes)
else:
self.maxVotes = 0
self.maxBeansFromVotes = 0
def reqCountUp(state):
self.countUp()
return Task.done
countUpDelay = DELAY_BEFORE_COUNT_UP
taskMgr.doMethodLater(countUpDelay, reqCountUp, 'countUpTask')
def reqCountDown(state):
self.countDown()
return Task.done
countDownDelay = countUpDelay + COUNT_UP_DURATION + DELAY_AFTER_COUNT_UP
taskMgr.doMethodLater(countDownDelay, reqCountDown, 'countDownTask')
#.........这里部分代码省略.........