• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python DistributedPartyActivity.DistributedPartyActivity类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中toontown.parties.DistributedPartyActivity.DistributedPartyActivity的典型用法代码示例。如果您正苦于以下问题:Python DistributedPartyActivity类的具体用法?Python DistributedPartyActivity怎么用?Python DistributedPartyActivity使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: joinRequestDenied

 def joinRequestDenied(self, reason):
     DistributedPartyActivity.joinRequestDenied(self, reason)
     self.notify.debug('joinRequestDenied')
     if reason == PartyGlobals.DenialReasons.Full:
         self.showMessage(TTLocalizer.PartyTeamActivityTeamFull)
     elif reason == PartyGlobals.DenialReasons.Default:
         self.showMessage(TTLocalizer.PartyTeamActivityJoinDenied % self.getTitle())
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leak,代码行数:7,代码来源:DistributedPartyTeamActivity.py


示例2: unload

 def unload(self):
     DistributedPartyTrampolineActivity.notify.debug('unload')
     if self.hopOnAnim and self.hopOnAnim.isPlaying():
         self.hopOnAnim.finish()
     if self.hopOffAnim and self.hopOffAnim.isPlaying():
         self.hopOffAnim.finish()
     if self.beginRoundInterval and self.beginRoundInterval.isPlaying():
         self.beginRoundInterval.finish()
     if self.flashTextInterval and self.flashTextInterval.isPlaying():
         self.flashTextInterval.finish()
     if self.heightTextInterval and self.heightTextInterval.isPlaying():
         self.heightTextInterval.finish()
     self.timer.stop()
     DistributedPartyActivity.unload(self)
     taskMgr.remove(self.uniqueName('TrampolineActivity.updateTask'))
     taskMgr.remove(self.uniqueName('TrampolineActivity.remoteUpdateTask'))
     self.ignoreAll()
     del self.heightTextInterval
     del self.beginRoundInterval
     del self.hopOnAnim
     del self.hopOffAnim
     del self.flashTextInterval
     if hasattr(self, 'beanAnims'):
         self.cleanupJellyBeans()
     self.quitEarlyButton.destroy()
     del self.quitEarlyButton
     del self.gui
     del self.activityFSM
     del self.animFSM
     return
开发者ID:CalebSmith376,项目名称:src,代码行数:30,代码来源:DistributedPartyTrampolineActivity.py


示例3: __init__

 def __init__(self, cr):
     DistributedPartyActivity.__init__(
         self, cr, PartyGlobals.ActivityIds.PartyCatch, PartyGlobals.ActivityTypes.HostInitiated, wantRewardGui=True
     )
     self.setUsesSmoothing()
     self.setUsesLookAround()
     self._sNumGen = SerialNumGen()
开发者ID:BmanGames,项目名称:Toontown-Level-Editor,代码行数:7,代码来源:DistributedPartyCatchActivity.py


示例4: generate

 def generate(self):
     DistributedPartyActivity.generate(self)
     self._doneCannons = False
     self._avId2trajectoryInfo = {}
     self._remoteToonFlyTaskName = 'remoteToonFlyTask-%s' % self.doId
     taskMgr.add(self._remoteToonFlyTask, self._remoteToonFlyTaskName, priority=45)
     self.d_cloudsColorRequest()
开发者ID:LittleNed,项目名称:Toontown-Online-No-TTR,代码行数:7,代码来源:DistributedPartyCannonActivity.py


示例5: unload

    def unload(self):
        DistributedPartyActivity.unload(self)
        self.activityFSM.request('Disabled')
        if self.localToonDanceSequence is not None:
            self.localToonDanceSequence.finish()
        if self.localToonDancing:
            self.__localStopDancing()
        self.ignoreAll()
        if self.discoBallSequence is not None:
            self.discoBallSequence.finish()
        if self.danceFloorSequence is not None:
            self.danceFloorSequence.finish()
        del self.danceFloorSequence
        del self.discoBallSequence
        del self.localToonDanceSequence
        if self.danceFloor is not None:
            self.danceFloor.removeNode()
            self.danceFloor = None
        self.__destroyOrthoWalk()
        for toonId in self.dancingToonFSMs.keys():
            self.dancingToonFSMs[toonId].destroy()
            del self.dancingToonFSMs[toonId]

        del self.dancingToonFSMs
        del self.cameraParallel
        del self.currentCameraMode
        if self.keyCodes is not None:
            self.keyCodes.destroy()
            del self.keyCodes
        del self.activityFSM
        del self.gui
        del self.localPatternsMatched
        return
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leaked-Source,代码行数:33,代码来源:DistributedPartyDanceActivityBase.py


示例6: generateInit

 def generateInit(self):
     self.notify.debug('generateInit')
     DistributedPartyActivity.generateInit(self)
     self.keyCodes = KeyCodes(patterns=self.dancePatternToAnims.keys())
     self.gui = KeyCodesGui(self.keyCodes)
     self.__initOrthoWalk()
     self.activityFSM = DanceActivityFSM(self)
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leaked-Source,代码行数:7,代码来源:DistributedPartyDanceActivityBase.py


示例7: unload

 def unload(self):
     self.notify.debug('unload')
     DistributedPartyActivity.unload(self)
     if self.shadowNode is not None:
         self.shadowNode.removeNode()
         del self.shadowNode
     if self.splash is not None:
         self.splash.destroy()
         del self.splash
     if self.dustCloud is not None:
         self.dustCloud.destroy()
         del self.dustCloud
     del self.sndHitHouse
     del self.sndHitGround
     del self.sndHitWater
     del self.sndBounce1
     del self.sndBounce2
     del self.sndBounce3
     if self.localFlyingToon:
         self.__resetToon(self.localFlyingToon)
         self.localFlyingToon.loop('neutral')
         self.localFlyingToon.setPlayRate(1.0, 'run')
         self.localFlyingToon = None
     self.ignoreAll()
     return
开发者ID:LittleNed,项目名称:Toontown-Online-No-TTR,代码行数:25,代码来源:DistributedPartyCannonActivity.py


示例8: unload

    def unload(self):
        DistributedPartyCatchActivity.notify.debug('unload')
        self.finishAllDropIntervals()
        self.destroyOrthoWalk()
        DistributedPartyActivity.unload(self)
        self.stopDropTask()
        del self.activityFSM
        del self.__textGen
        for avId in self.toonSDs.keys():
            if self.toonSDs.has_key(avId):
                toonSD = self.toonSDs[avId]
                toonSD.unload()

        del self.toonSDs
        self.treesAndFence.removeNode()
        del self.treesAndFence
        self.dropShadow.removeNode()
        del self.dropShadow
        base.cr.parentMgr.unregisterParent(self._avatarNodePathParentToken)
        for model in self.dropObjModels.values():
            model.removeNode()

        del self.dropObjModels
        del self.sndGoodCatch
        del self.sndOof
        del self.sndAnvilLand
        del self.sndPerfect
开发者ID:frogtongue,项目名称:tonguefrog,代码行数:27,代码来源:DistributedPartyCatchActivity.py


示例9: setToonsPlaying

 def setToonsPlaying(self, toonIds):
     self.notify.info('setToonsPlaying(%s)' % (toonIds,))
     DistributedPartyActivity.setToonsPlaying(self, toonIds)
     if self.isLocalToonInActivity() and base.localAvatar.doId not in toonIds:
         if self.toonSDs.has_key(base.localAvatar.doId):
             self.takeLocalAvatarOutOfActivity()
             self.toonSDs[base.localAvatar.doId].fsm.request('notPlaying')
开发者ID:frogtongue,项目名称:tonguefrog,代码行数:7,代码来源:DistributedPartyCatchActivity.py


示例10: _enableCollisions

 def _enableCollisions(self):
     DistributedPartyActivity._enableCollisions(self)
     self._enteredTree = False
     self.accept('enter' + self.catchTreeZoneEvent, self._toonMayHaveEnteredTree)
     self.accept('again' + self.catchTreeZoneEvent, self._toonMayHaveEnteredTree)
     self.accept('exit' + self.catchTreeZoneEvent, self._toonExitedTree)
     self.accept(DistributedPartyCannonActivity.LOCAL_TOON_LANDED_EVENT, self._handleCannonLanded)
开发者ID:frogtongue,项目名称:tonguefrog,代码行数:7,代码来源:DistributedPartyCatchActivity.py


示例11: exitRequestDenied

 def exitRequestDenied(self, reason):
     DistributedPartyActivity.exitRequestDenied(self, reason)
     if reason == PartyGlobals.DenialReasons.Default:
         self.showMessage(TTLocalizer.PartyTeamActivityExitDenied % self.getTitle())
     if self.isLocalToonPlaying and (self.isState('WaitToStart') or self.isState('WaitForEnough')):
         self.teamActivityGui.enableExitButton()
         if self._canSwitchTeams:
             self.teamActivityGui.enableSwitchButton()
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leak,代码行数:8,代码来源:DistributedPartyTeamActivity.py


示例12: setState

 def setState(self, newState, timestamp, data):
     DistributedPartyActivity.setState(self, newState, timestamp)
     if newState == 'WaitToStart':
         self.activityFSM.request(newState, timestamp)
     elif newState == 'Conclusion':
         self.activityFSM.request(newState, data)
     else:
         self.activityFSM.request(newState)
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leak,代码行数:8,代码来源:DistributedPartyTeamActivity.py


示例13: postHopOn

 def postHopOn(self):
     self.toon.setH(self.toon.getH() + 90.0)
     self.toon.dropShadow.reparentTo(self.surface)
     self.timeLeftToSimulate = 0.0
     self.doSimulateStep = False
     taskMgr.add(self.updateTask, self.uniqueName('TrampolineActivity.updateTask'))
     base.setCellsActive(base.leftCells, False)
     base.setCellsActive(base.bottomCells, False)
     DistributedPartyActivity.startRules(self)
开发者ID:CalebSmith376,项目名称:src,代码行数:9,代码来源:DistributedPartyTrampolineActivity.py


示例14: unload

 def unload(self):
     DistributedPartyActivity.unload(self)
     self.gui.unload()
     if self.music is not None:
         self.music.stop()
     self.jukebox.stop()
     self.jukebox.delete()
     self.jukebox = None
     self.ignoreAll()
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leak,代码行数:9,代码来源:DistributedPartyJukeboxActivityBase.py


示例15: __init__

 def __init__(self, cr, actId, phaseToMusicData):
     DistributedPartyActivity.__init__(self, cr, actId, ActivityTypes.Continuous)
     self.phaseToMusicData = phaseToMusicData
     self.jukebox = None
     self.gui = None
     self.tunes = []
     self.music = None
     self.currentSongData = None
     self.localQueuedSongInfo = None
     self.localQueuedSongListItem = None
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leak,代码行数:10,代码来源:DistributedPartyJukeboxActivityBase.py


示例16: __init__

 def __init__(self, cr, doJellyBeans = True, doTricks = False, texture = None):
     DistributedPartyTrampolineActivity.notify.debug('__init__')
     DistributedPartyActivity.__init__(self, cr, PartyGlobals.ActivityIds.PartyTrampoline, PartyGlobals.ActivityTypes.GuestInitiated, wantLever=False, wantRewardGui=True)
     self.doJellyBeans = doJellyBeans
     self.doTricks = doTricks
     self.texture = texture
     self.toon = None
     self.trampHeight = 3.6
     self.trampK = 400.0
     self.normalTrampB = 2.5
     self.leavingTrampB = 8.0
     self.trampB = self.normalTrampB
     self.g = -32.0
     self.jumpBoost = 330.0
     self.beginningBoost = 500.0
     self.beginningBoostThreshold = self.trampHeight + 1.5
     self.earlyJumpThreshold = 75.0
     self.boingThreshold = 300.0
     self.turnFactor = 120.0
     self.stepDT = 0.001
     self.targetCameraPos = Point3(0.0, 40.0, 10.0)
     self.cameraSpeed = 2.0
     self.hopOffPos = Point3(16.0, 0.0, 0.0)
     self.indicatorFactor = 0.0095
     self.dropShadowCutoff = 15.0
     self.minHeightForText = 15.0
     self.heightTextOffset = -0.065
     self.beanOffset = 0.5
     self.guiBeanOffset = -0.02
     self.jumpTextShown = False
     self.toonJumped = False
     self.turnLeft = False
     self.turnRight = False
     self.leavingTrampoline = False
     self.toonVelocity = 0.0
     self.topHeight = 0.0
     self.lastPeak = 0.0
     self.beginRoundInterval = None
     self.hopOnAnim = None
     self.hopOffAnim = None
     self.flashTextInterval = None
     self.numJellyBeans = PartyGlobals.TrampolineNumJellyBeans
     self.jellyBeanBonus = PartyGlobals.TrampolineJellyBeanBonus
     self.jellyBeanStartHeight = 20.0
     self.jellyBeanStopHeight = 90.0
     self.jellyBeanColors = [VBase4(1.0, 0.5, 0.5, 1.0),
      VBase4(0.5, 1.0, 0.5, 1.0),
      VBase4(0.5, 1.0, 1.0, 1.0),
      VBase4(1.0, 1.0, 0.4, 1.0),
      VBase4(0.4, 0.4, 1.0, 1.0),
      VBase4(1.0, 0.5, 1.0, 1.0)]
     delta = (self.jellyBeanStopHeight - self.jellyBeanStartHeight) / (self.numJellyBeans - 1)
     self.jellyBeanPositions = [ self.jellyBeanStartHeight + n * delta for n in xrange(self.numJellyBeans) ]
     self.doSimulateStep = False
     return
开发者ID:CalebSmith376,项目名称:src,代码行数:55,代码来源:DistributedPartyTrampolineActivity.py


示例17: unload

 def unload(self):
     DistributedPartyActivity.unload(self)
     del self.activityFSM
     self.teamActivityGui.unload()
     del self.teamActivityGui
     if hasattr(self, 'toonIds'):
         del self.toonIds
     del self.isLocalToonPlaying
     del self.localToonTeam
     del self.advantage
     del self.waitToStartTimestamp
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leak,代码行数:11,代码来源:DistributedPartyTeamActivity.py


示例18: setState

 def setState(self, newState, timestamp):
     self.notify.info('setState(%s, %s)' % (newState, timestamp))
     DistributedPartyCatchActivity.notify.debug('setState( newState=%s, ... )' % newState)
     DistributedPartyActivity.setState(self, newState, timestamp)
     self.activityFSM.request(newState)
     if newState == 'Active':
         if base.localAvatar.doId != self.party.partyInfo.hostId:
             if globalClock.getFrameCount() > self._generateFrame:
                 if base.localAvatar.getX() > self.x - self.StageHalfWidth and base.localAvatar.getX() < self.x + self.StageHalfWidth and base.localAvatar.getY() > self.y - self.StageHalfHeight and base.localAvatar.getY() < self.y + self.StageHalfHeight:
                     self._toonEnteredTree(None)
     return
开发者ID:frogtongue,项目名称:tonguefrog,代码行数:11,代码来源:DistributedPartyCatchActivity.py


示例19: load

 def load(self):
     DistributedPartyActivity.load(self)
     self.danceFloor = loader.loadModel(self.model)
     self.danceFloor.reparentTo(self.getParentNodePath())
     self.danceFloor.setPos(self.x, self.y, 0.0)
     self.danceFloor.setH(self.h)
     self.danceFloor.wrtReparentTo(render)
     self.sign.setPos(22, -22, 0)
     floor = self.danceFloor.find('**/danceFloor_mesh')
     self.danceFloorSequence = Sequence(Wait(0.3), Func(floor.setH, floor, 36))
     discoBall = self.danceFloor.find('**/discoBall_mesh')
     self.discoBallSequence = Parallel(discoBall.hprInterval(6.0, Vec3(360, 0, 0)), Sequence(discoBall.posInterval(3, Point3(0, 0, 1), blendType='easeInOut'), discoBall.posInterval(3, Point3(0, 0, 0), blendType='easeInOut')))
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leaked-Source,代码行数:12,代码来源:DistributedPartyDanceActivityBase.py


示例20: load

 def load(self):
     DistributedPartyTrampolineActivity.notify.debug('load')
     DistributedPartyActivity.load(self)
     self.loadModels()
     self.loadCollision()
     self.loadGUI()
     self.loadSounds()
     self.loadIntervals()
     self.activityFSM = TrampolineActivityFSM(self)
     self.activityFSM.request('Idle')
     self.animFSM = TrampolineAnimFSM(self)
     self.setBestHeightInfo('', 0)
开发者ID:CalebSmith376,项目名称:src,代码行数:12,代码来源:DistributedPartyTrampolineActivity.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python DistributedPartyActivityAI.DistributedPartyActivityAI类代码示例发布时间:2022-05-27
下一篇:
Python parties.PartyUtils类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap