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


Python Suit.attachSuitHead方法代码示例

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


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

示例1: load

# 需要导入模块: from toontown.suit import Suit [as 别名]
# 或者: from toontown.suit.Suit import attachSuitHead [as 别名]
 def load(self):
     if self.isLoaded == 1:
         return None
     
     self.isLoaded = 1
     gui = loader.loadModel('phase_3/models/gui/dialog_box_buttons_gui')
     guiButton = loader.loadModel('phase_3/models/gui/quit_button')
     self.head = Suit.attachSuitHead(self, self.suitName)
     z = self.head.getZ()
     self.head.setPos(-0.40000000000000002, -0.10000000000000001, z + 0.20000000000000001)
     self.suitLabel = DirectLabel(parent = self, relief = None, text = self.suitFullName, text_font = ToontownGlobals.getSuitFont(), pos = (-0.40000000000000002, 0, 0), scale = 0.070000000000000007)
     closeButtonImage = (gui.find('**/CloseBtn_UP'), gui.find('**/CloseBtn_DN'), gui.find('**/CloseBtn_Rllvr'))
     buttonImage = (guiButton.find('**/QuitBtn_UP'), guiButton.find('**/QuitBtn_DN'), guiButton.find('**/QuitBtn_RLVR'))
     disabledColor = Vec4(0.5, 0.5, 0.5, 1)
     self.summonSingleButton = DirectButton(parent = self, relief = None, text = TTL.SummonDlgButton1, image = buttonImage, image_scale = (1.7, 1, 1), image3_color = disabledColor, text_scale = 0.059999999999999998, text_pos = (0, -0.01), pos = (0.29999999999999999, 0, 0.25), command = self.issueSummons, extraArgs = [
         'single'])
     self.summonBuildingButton = DirectButton(parent = self, relief = None, text = TTL.SummonDlgButton2, image = buttonImage, image_scale = (1.7, 1, 1), image3_color = disabledColor, text_scale = 0.059999999999999998, text_pos = (0, -0.01), pos = (0.29999999999999999, 0, 0.125), command = self.issueSummons, extraArgs = [
         'building'])
     self.summonInvasionButton = DirectButton(parent = self, relief = None, text = TTL.SummonDlgButton3, image = buttonImage, image_scale = (1.7, 1, 1), image3_color = disabledColor, text_scale = 0.059999999999999998, text_pos = (0, -0.01), pos = (0.29999999999999999, 0, 0.0), command = self.issueSummons, extraArgs = [
         'invasion'])
     self.statusLabel = DirectLabel(parent = self, relief = None, text = '', text_wordwrap = 12, pos = (0.29999999999999999, 0, 0.25), scale = 0.070000000000000007)
     self.cancel = DirectButton(parent = self, relief = None, image = closeButtonImage, pos = (0.69999999999999996, 0, -0.10000000000000001), command = self._SummonCogDialog__cancel)
     gui.removeNode()
     guiButton.removeNode()
     self.hide()
开发者ID:OldToontown,项目名称:OldToontown,代码行数:27,代码来源:SummonCogDialog.py

示例2: load

# 需要导入模块: from toontown.suit import Suit [as 别名]
# 或者: from toontown.suit.Suit import attachSuitHead [as 别名]
 def load(self):
     if self.isLoaded == 1:
         return None
     self.isLoaded = 1
     gui = loader.loadModel('phase_3/models/gui/dialog_box_buttons_gui')
     guiButton = loader.loadModel('phase_3/models/gui/quit_button')
     self.head = Suit.attachSuitHead(self, self.suitName)
     z = self.head.getZ()
     self.head.setPos(-0.4, -0.1, z + 0.14)
     self.suitLabel = DirectLabel(parent=self, relief=None, text=self.suitFullName, text_font=ToontownGlobals.getSuitFont(), pos=(-0.4, 0, -0.085), scale=0.07)
     closeButtonImage = (gui.find('**/CloseBtn_UP'), gui.find('**/CloseBtn_DN'), gui.find('**/CloseBtn_Rllvr'))
     buttonImage = (guiButton.find('**/QuitBtn_UP'), guiButton.find('**/QuitBtn_DN'), guiButton.find('**/QuitBtn_RLVR'))
     disabledColor = Vec4(0.5, 0.5, 0.5, 1)
     base.cr.lmao = self
     self.summonBuildingButton = DirectButton(parent=self, relief=None, text=TTLocalizer.SummonDlgButton1, image=buttonImage, image_scale=(1.7, 1, 1), image3_color=disabledColor, text_scale=0.06, text_pos=(0, -0.01), pos=(0.3, 0, 0.35), command=self.issueSummons, extraArgs=['building'])
     self.summonInvasionButton = DirectButton(parent=self, relief=None, text=TTLocalizer.SummonDlgButton2, image=buttonImage, image_scale=(1.7, 1, 1), image3_color=disabledColor, text_scale=0.06, text_pos=(0, -0.01), pos=(0.3, 0, 0.225), command=self.issueSummons, extraArgs=['invasion'])
     self.summonCogdoButton = DirectButton(parent=self, relief=None, text=TTLocalizer.SummonDlgButton3, image=buttonImage, image_scale=(1.7, 1, 1), image3_color=disabledColor, text_scale=0.06, text_pos=(0, -0.01), pos=(0.3, 0, 0.1), command=self.issueSummons, extraArgs=['cogdo'])
     self.summonSkelInvasionButton = DirectButton(parent=self, relief=None, text=TTLocalizer.SummonDlgButton4, image=buttonImage, image_scale=(1.7, 1, 1), image3_color=disabledColor, text_scale=0.051, text_pos=(0, -0.01), pos=(0.3, 0, -0.025), command=self.issueSummons, extraArgs=['skelinvasion'])
     self.summonWaiterInvasionButton = DirectButton(parent=self, relief=None, text=TTLocalizer.SummonDlgButton5, image=buttonImage, image_scale=(1.7, 1, 1), image3_color=disabledColor, text_scale=0.056, text_pos=(0, -0.01), pos=(0.3, 0, -0.15), command=self.issueSummons, extraArgs=['waiterinvasion'])
     self.summonV2InvasionButton = DirectButton(parent=self, relief=None, text=TTLocalizer.SummonDlgButton6, image=buttonImage, image_scale=(1.7, 1, 1), image3_color=disabledColor, text_scale=0.048, text_pos=(0, -0.01), pos=(0.3, 0, -0.275), command=self.issueSummons, extraArgs=['v2invasion'])
     self.statusLabel = DirectLabel(parent=self, relief=None, text='', text_wordwrap=12, pos=(0.3, 0, 0.3), scale=0.07)
     self.cancel = DirectButton(parent=self, relief=None, image=closeButtonImage, pos=(0.7, 0, -0.366), command=self.__cancel)
     gui.removeNode()
     guiButton.removeNode()
     self.hide()
     return
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:28,代码来源:SummonCogDialog.py

示例3: addSuitHead

# 需要导入模块: from toontown.suit import Suit [as 别名]
# 或者: from toontown.suit.Suit import attachSuitHead [as 别名]
 def addSuitHead(self, panel, suitName):
     panelIndex = self.panels.index(panel)
     shadow = panel.attachNewNode('shadow')
     shadowModel = self.shadowModels[panelIndex]
     shadowModel.copyTo(shadow)
     coords = SHADOW_SCALE_POS[panelIndex]
     shadow.setScale(coords[0])
     shadow.setPos(coords[1], coords[2], coords[3])
     panel.shadow = shadow
     panel.head = Suit.attachSuitHead(panel, suitName)
开发者ID:NostalgicTTR,项目名称:Toontown-Infinite-2016-Leak,代码行数:12,代码来源:SuitPage.py

示例4: setSuitHead

# 需要导入模块: from toontown.suit import Suit [as 别名]
# 或者: from toontown.suit.Suit import attachSuitHead [as 别名]
 def setSuitHead(self, suitName):
     self.head = Suit.attachSuitHead(self, suitName)
     self.head.setX(0.1)
     self.head.setZ(0.01)
开发者ID:Teku16,项目名称:ToontownPlanet,代码行数:6,代码来源:TownBattleCogPanel.py

示例5: load

# 需要导入模块: from toontown.suit import Suit [as 别名]
# 或者: from toontown.suit.Suit import attachSuitHead [as 别名]
 def load(self):
     if self.isLoaded == 1:
         return None
     self.isLoaded = 1
     gui = loader.loadModel("phase_3/models/gui/dialog_box_buttons_gui")
     guiButton = loader.loadModel("phase_3/models/gui/quit_button")
     self.head = Suit.attachSuitHead(self, self.suitName)
     z = self.head.getZ()
     self.head.setPos(-0.4, -0.1, z + 0.2)
     self.suitLabel = DirectLabel(
         parent=self,
         relief=None,
         text=self.suitFullName,
         text_font=ToontownGlobals.getSuitFont(),
         pos=(-0.4, 0, 0),
         scale=0.07,
     )
     closeButtonImage = (gui.find("**/CloseBtn_UP"), gui.find("**/CloseBtn_DN"), gui.find("**/CloseBtn_Rllvr"))
     buttonImage = (
         guiButton.find("**/QuitBtn_UP"),
         guiButton.find("**/QuitBtn_DN"),
         guiButton.find("**/QuitBtn_RLVR"),
     )
     disabledColor = Vec4(0.5, 0.5, 0.5, 1)
     self.summonSingleButton = DirectButton(
         parent=self,
         relief=None,
         text=TTL.SummonDlgButton1,
         image=buttonImage,
         image_scale=(1.7, 1, 1),
         image3_color=disabledColor,
         text_scale=0.06,
         text_pos=(0, -0.01),
         pos=(0.3, 0, 0.25),
         command=self.issueSummons,
         extraArgs=["single"],
     )
     self.summonBuildingButton = DirectButton(
         parent=self,
         relief=None,
         text=TTL.SummonDlgButton2,
         image=buttonImage,
         image_scale=(1.7, 1, 1),
         image3_color=disabledColor,
         text_scale=0.06,
         text_pos=(0, -0.01),
         pos=(0.3, 0, 0.125),
         command=self.issueSummons,
         extraArgs=["building"],
     )
     self.summonInvasionButton = DirectButton(
         parent=self,
         relief=None,
         text=TTL.SummonDlgButton3,
         image=buttonImage,
         image_scale=(1.7, 1, 1),
         image3_color=disabledColor,
         text_scale=0.06,
         text_pos=(0, -0.01),
         pos=(0.3, 0, 0.0),
         command=self.issueSummons,
         extraArgs=["invasion"],
     )
     self.statusLabel = DirectLabel(
         parent=self, relief=None, text="", text_wordwrap=12, pos=(0.3, 0, 0.25), scale=0.07
     )
     self.cancel = DirectButton(
         parent=self, relief=None, image=closeButtonImage, pos=(0.7, 0, -0.1), command=self.__cancel
     )
     gui.removeNode()
     guiButton.removeNode()
     self.hide()
     return
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leaked-Source,代码行数:75,代码来源:SummonCogDialog.py

示例6: generateSuitHead

# 需要导入模块: from toontown.suit import Suit [as 别名]
# 或者: from toontown.suit.Suit import attachSuitHead [as 别名]
 def generateSuitHead(self, name):
     self.suitHead = Suit.attachSuitHead(self, name)
     self.suitHead.setScale(0.05)
     self.suitHead.setPos(0.1, 0, 0.01)
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:6,代码来源:TownBattleCogPanel.py

示例7: setSuitHead

# 需要导入模块: from toontown.suit import Suit [as 别名]
# 或者: from toontown.suit.Suit import attachSuitHead [as 别名]
 def setSuitHead(self, suitName):
     self.suitHead = Suit.attachSuitHead(self.suitHeadLabel, suitName)
     self.suitHead.setScale(0.2)
     self.dropShadow.reparentTo(self.suitHead)
开发者ID:Teku16,项目名称:TTR-Offline,代码行数:6,代码来源:ShardPage.py


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