当前位置: 首页>>代码示例>>Python>>正文


Python NametagGlobals.setOnscreenChatForced方法代码示例

本文整理汇总了Python中libotp.NametagGlobals.setOnscreenChatForced方法的典型用法代码示例。如果您正苦于以下问题:Python NametagGlobals.setOnscreenChatForced方法的具体用法?Python NametagGlobals.setOnscreenChatForced怎么用?Python NametagGlobals.setOnscreenChatForced使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在libotp.NametagGlobals的用法示例。


在下文中一共展示了NametagGlobals.setOnscreenChatForced方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: exitControlled

# 需要导入模块: from libotp import NametagGlobals [as 别名]
# 或者: from libotp.NametagGlobals import setOnscreenChatForced [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.setOnscreenChatForced(0)
        base.camLens.setMinFov(ToontownGlobals.DefaultCameraFov/(4./3.))
        return
开发者ID:Grant11,项目名称:mf0DJnN,代码行数:29,代码来源:DistributedVehicle.py

示例2: enterControlled

# 需要导入模块: from libotp import NametagGlobals [as 别名]
# 或者: from libotp.NametagGlobals import setOnscreenChatForced [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.setOnscreenChatForced(1)
        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
开发者ID:Grant11,项目名称:mf0DJnN,代码行数:36,代码来源:DistributedVehicle.py

示例3: exitReward

# 需要导入模块: from libotp import NametagGlobals [as 别名]
# 或者: from libotp.NametagGlobals import setOnscreenChatForced [as 别名]
    def exitReward(self):
        self.ignore('clientCleanup')
        taskMgr.remove('countUpTask')
        taskMgr.remove('countVotesUpTask')
        taskMgr.remove('countDownTask')
        taskMgr.remove('countVotesDownTask')
        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.convertingVotesToBeansLabel.hide()
        self.rewardDoubledJellybeanLabel.hide()
        base.camLens.setMinFov(ToontownGlobals.DefaultCameraFov/(4./3.))
        NametagGlobals.setOnscreenChatForced(0)
开发者ID:Grant11,项目名称:mf0DJnN,代码行数:39,代码来源:Purchase.py

示例4: enterReward

# 需要导入模块: from libotp import NametagGlobals [as 别名]
# 或者: from libotp.NametagGlobals import setOnscreenChatForced [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.setFov(60)
        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.setOnscreenChatForced(1)
        for index in range(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')

#.........这里部分代码省略.........
开发者ID:Grant11,项目名称:mf0DJnN,代码行数:103,代码来源:Purchase.py


注:本文中的libotp.NametagGlobals.setOnscreenChatForced方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。