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


Python Quests.avatarHasPhoneQuest方法代码示例

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


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

示例1: ringIfHasPhoneQuest

# 需要导入模块: from toontown.quest import Quests [as 别名]
# 或者: from toontown.quest.Quests import avatarHasPhoneQuest [as 别名]
 def ringIfHasPhoneQuest(self, task):
     if Quests.avatarHasPhoneQuest(base.localAvatar) and not Quests.avatarHasCompletedPhoneQuest(base.localAvatar):
         self.ring()
     return Task.done
开发者ID:OldToontown,项目名称:OldToontown,代码行数:6,代码来源:DistributedPhone.py

示例2: enterTeleportIn

# 需要导入模块: from toontown.quest import Quests [as 别名]
# 或者: from toontown.quest.Quests import avatarHasPhoneQuest [as 别名]
 def enterTeleportIn(self, requestStatus):
     imgScale = 0.25
     if self.dialog:
         x, y, z, h, p, r = base.cr.hoodMgr.getPlaygroundCenterFromId(self.loader.hood.id)
     elif base.localAvatar.hp < 1:
         requestStatus['nextState'] = 'popup'
         x, y, z, h, p, r = base.cr.hoodMgr.getPlaygroundCenterFromId(self.loader.hood.id)
         self.accept('deathAck', self.__handleDeathAck, extraArgs=[requestStatus])
         self.deathAckBox = DeathForceAcknowledge.DeathForceAcknowledge(doneEvent='deathAck')
     elif base.localAvatar.hp > 0 and (Quests.avatarHasTrolleyQuest(base.localAvatar) or Quests.avatarHasFirstCogQuest(base.localAvatar) or Quests.avatarHasFriendQuest(base.localAvatar) or Quests.avatarHasPhoneQuest(base.localAvatar) and Quests.avatarHasCompletedPhoneQuest(base.localAvatar)) and self.loader.hood.id == ToontownGlobals.ToontownCentral:
         requestStatus['nextState'] = 'popup'
         imageModel = loader.loadModel('phase_4/models/gui/tfa_images')
         if base.localAvatar.quests[0][0] == Quests.TROLLEY_QUEST_ID:
             if not Quests.avatarHasCompletedTrolleyQuest(base.localAvatar):
                 x, y, z, h, p, r = base.cr.hoodMgr.getDropPoint(base.cr.hoodMgr.ToontownCentralInitialDropPoints)
                 msg = TTLocalizer.NPCForceAcknowledgeMessage3
                 imgNodePath = imageModel.find('**/trolley-dialog-image')
                 imgPos = (0, 0, 0.04)
                 imgScale = 0.5
             else:
                 x, y, z, h, p, r = base.cr.hoodMgr.getDropPoint(base.cr.hoodMgr.ToontownCentralHQDropPoints)
                 msg = TTLocalizer.NPCForceAcknowledgeMessage4
                 imgNodePath = imageModel.find('**/hq-dialog-image')
                 imgPos = (0, 0, -0.02)
                 imgScale = 0.5
         elif base.localAvatar.quests[0][0] == Quests.FIRST_COG_QUEST_ID:
             if not Quests.avatarHasCompletedFirstCogQuest(base.localAvatar):
                 x, y, z, h, p, r = base.cr.hoodMgr.getDropPoint(base.cr.hoodMgr.ToontownCentralTunnelDropPoints)
                 msg = TTLocalizer.NPCForceAcknowledgeMessage5
                 imgNodePath = imageModel.find('**/tunnelSignA')
                 imgPos = (0, 0, 0.04)
                 imgScale = 0.5
             else:
                 x, y, z, h, p, r = base.cr.hoodMgr.getDropPoint(base.cr.hoodMgr.ToontownCentralHQDropPoints)
                 msg = TTLocalizer.NPCForceAcknowledgeMessage6
                 imgNodePath = imageModel.find('**/hq-dialog-image')
                 imgPos = (0, 0, 0.05)
                 imgScale = 0.5
         elif base.localAvatar.quests[0][0] == Quests.FRIEND_QUEST_ID:
             if not Quests.avatarHasCompletedFriendQuest(base.localAvatar):
                 x, y, z, h, p, r = base.cr.hoodMgr.getDropPoint(base.cr.hoodMgr.ToontownCentralInitialDropPoints)
                 msg = TTLocalizer.NPCForceAcknowledgeMessage7
                 gui = loader.loadModel('phase_3.5/models/gui/friendslist_gui')
                 imgNodePath = gui.find('**/FriendsBox_Closed')
                 imgPos = (0, 0, 0.04)
                 imgScale = 1.0
                 gui.removeNode()
             else:
                 x, y, z, h, p, r = base.cr.hoodMgr.getDropPoint(base.cr.hoodMgr.ToontownCentralHQDropPoints)
                 msg = TTLocalizer.NPCForceAcknowledgeMessage8
                 imgNodePath = imageModel.find('**/hq-dialog-image')
                 imgPos = (0, 0, 0.05)
                 imgScale = 0.5
         elif base.localAvatar.quests[0][0] == Quests.PHONE_QUEST_ID:
             if Quests.avatarHasCompletedPhoneQuest(base.localAvatar):
                 x, y, z, h, p, r = base.cr.hoodMgr.getDropPoint(base.cr.hoodMgr.ToontownCentralHQDropPoints)
                 msg = TTLocalizer.NPCForceAcknowledgeMessage9
                 imgNodePath = imageModel.find('**/hq-dialog-image')
                 imgPos = (0, 0, 0.05)
                 imgScale = 0.5
         self.dialog = TTDialog.TTDialog(text=msg, command=self.__cleanupDialog, style=TTDialog.Acknowledge)
         imgLabel = DirectLabel.DirectLabel(parent=self.dialog, relief=None, pos=imgPos, scale=TTLocalizer.PimgLabel, image=imgNodePath, image_scale=imgScale)
         imageModel.removeNode()
     else:
         requestStatus['nextState'] = 'walk'
         x, y, z, h, p, r = base.cr.hoodMgr.getPlaygroundCenterFromId(self.loader.hood.id)
     base.localAvatar.detachNode()
     base.localAvatar.setPosHpr(render, x, y, z, h, p, r)
     Place.Place.enterTeleportIn(self, requestStatus)
     return
开发者ID:nate97,项目名称:src,代码行数:72,代码来源:Playground.py


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