本文整理汇总了Python中src.toontown.toonbase.ToontownGlobals类的典型用法代码示例。如果您正苦于以下问题:Python ToontownGlobals类的具体用法?Python ToontownGlobals怎么用?Python ToontownGlobals使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ToontownGlobals类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self):
Avatar.Avatar.__init__(self)
self.setFont(ToontownGlobals.getSuitFont())
self.nametag.setSpeechFont(ToontownGlobals.getSuitFont())
self.setPlayerType(NametagGroup.CCSuit)
self.setPickable(0)
self.doorA = None
self.doorB = None
self.bubbleL = None
self.bubbleR = None
self.raised = 1
self.forward = 1
self.happy = 1
self.dizzy = 0
self.nowRaised = 1
self.nowForward = 1
self.nowHappy = 1
self.currentAnimIval = None
self.queuedAnimIvals = []
self.treadsLeftPos = 0
self.treadsRightPos = 0
self.healthBar = None
self.healthCondition = 0
self.animDoneEvent = 'BossCogAnimDone'
self.animIvalName = 'BossCogAnimIval'
self.attackSpeed = 1
return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:27,代码来源:BossCog.py
示例2: knockKnockTrack
def knockKnockTrack(self, avatar, duration):
if avatar is None:
return
self.rimshot = base.loadSfx('phase_5/audio/sfx/AA_heal_telljoke.ogg')
self.knockSfx = base.loadSfx('phase_5/audio/sfx/GUI_knock_%s.ogg' % random.randint(1, 4))
joke = KnockKnockJokes[self.propId % len(KnockKnockJokes)]
place = base.cr.playGame.getPlace()
doorName = TTLocalizer.DoorNametag
self.nametag = None
self.nametagNP = None
doorNP = render.find('**/KnockKnockDoorSphere_' + str(self.propId) + ';+s')
if doorNP.isEmpty():
self.notify.warning('Could not find KnockKnockDoorSphere_%s' % self.propId)
return
self.nametag = NametagGroup()
self.nametag.setAvatar(doorNP)
self.nametag.setFont(ToontownGlobals.getToonFont())
self.nametag.setSpeechFont(ToontownGlobals.getToonFont())
self.nametag.setName(doorName)
self.nametag.setActive(0)
self.nametag.manage(base.marginManager)
self.nametag.getNametag3d().setBillboardOffset(4)
nametagNode = self.nametag.getNametag3d()
self.nametagNP = render.attachNewNode(nametagNode)
self.nametagNP.setName('knockKnockDoor_nt_' + str(self.propId))
pos = doorNP.getBounds().getCenter()
self.nametagNP.setPos(pos + Vec3(0, 0, avatar.getHeight() + 2))
d = duration * 0.125
track = Sequence(Parallel(Sequence(Wait(d * 0.5), SoundInterval(self.knockSfx)), Func(self.nametag.setChat, TTLocalizer.DoorKnockKnock, CFSpeech), Wait(d)), Func(avatar.setChatAbsolute, TTLocalizer.DoorWhosThere, CFSpeech | CFTimeout, openEnded=0), Wait(d), Func(self.nametag.setChat, joke[0], CFSpeech), Wait(d), Func(avatar.setChatAbsolute, joke[0] + TTLocalizer.DoorWhoAppendix, CFSpeech | CFTimeout, openEnded=0), Wait(d), Func(self.nametag.setChat, joke[1], CFSpeech))
if avatar == base.localAvatar:
track.append(Func(self.sendUpdate, 'requestToonup'))
track.append(Parallel(SoundInterval(self.rimshot, startTime=2.0), Wait(d * 4)))
track.append(Func(self.cleanupTrack))
track.delayDelete = DelayDelete.DelayDelete(avatar, 'knockKnockTrack')
return track
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:35,代码来源:DistributedKnockKnockDoor.py
示例3: setupButtons
def setupButtons(self):
gui = loader.loadModel('phase_3/models/gui/tt_m_gui_mat_mainGui')
arrowImage = (gui.find('**/tt_t_gui_mat_shuffleArrowUp'), gui.find('**/tt_t_gui_mat_shuffleArrowDown'))
buttonImage = (gui.find('**/tt_t_gui_mat_shuffleUp'), gui.find('**/tt_t_gui_mat_shuffleDown'))
self.title = DirectLabel(aspect2d, relief=None, text=TTLocalizer.GloveGuiTitle,
text_fg=(0, 1, 0, 1), text_scale=0.15, text_font=ToontownGlobals.getSignFont(),
pos=(0, 0, -0.30), text_shadow=(1, 1, 1, 1))
self.notice = DirectLabel(aspect2d, relief=None, text='', text_fg=(1, 0, 0, 1), text_scale=0.11,
text_font=ToontownGlobals.getSignFont(), pos=(0, 0, -0.45), text_shadow=(1, 1, 1, 1))
self.color = DirectLabel(aspect2d, relief=None, text='', text_scale=0.11, text_font=ToontownGlobals.getSignFont(),
pos=(0, 0, -0.70), text_shadow=(1, 1, 1, 1))
self.buyButton = DirectButton(aspect2d, relief=None, image=buttonImage, text=TTLocalizer.GloveGuiBuy,
text_font=ToontownGlobals.getInterfaceFont(), text_scale=0.11, text_pos=(0, -0.02),
pos=(-0.60, 0, -0.90), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), command=self.__exit, extraArgs=[GloveNPCGlobals.CHANGE])
self.cancelButton = DirectButton(aspect2d, relief=None, image=buttonImage, text=TTLocalizer.lCancel,
text_font=ToontownGlobals.getInterfaceFont(), text_scale=0.11, text_pos=(0, -0.02),
pos=(0.60, 0, -0.90), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), command=self.__exit, extraArgs=[GloveNPCGlobals.USER_CANCEL])
self.downArrow = DirectButton(aspect2d, relief=None, image=arrowImage, pos=(-0.60, 0, -0.66))
self.upArrow = DirectButton(aspect2d, relief=None, image=arrowImage, pos=(0.60, 0, -0.66), scale=-1)
gui.removeNode()
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:27,代码来源:GloveShopGui.py
示例4: load
def load(self):
gui = loader.loadModel("phase_3/models/gui/laff_o_meter")
if self.isToon:
hType = self.style.getType()
if hType == "dog":
headModel = gui.find("**/doghead")
elif hType == "cat":
headModel = gui.find("**/cathead")
elif hType == "mouse":
headModel = gui.find("**/mousehead")
elif hType == "horse":
headModel = gui.find("**/horsehead")
elif hType == "rabbit":
headModel = gui.find("**/bunnyhead")
elif hType == "duck":
headModel = gui.find("**/duckhead")
elif hType == "monkey":
headModel = gui.find("**/monkeyhead")
elif hType == "bear":
headModel = gui.find("**/bearhead")
elif hType == "pig":
headModel = gui.find("**/pighead")
else:
raise StandardError("unknown toon species: ", hType)
self.color = self.style.getHeadColor()
self.container["image"] = headModel
self.container["image_color"] = self.color
self.resetFrameSize()
self.setScale(0.1)
self.frown = DirectFrame(parent=self.container, relief=None, image=gui.find("**/frown"))
self.smile = DirectFrame(parent=self.container, relief=None, image=gui.find("**/smile"))
self.eyes = DirectFrame(parent=self.container, relief=None, image=gui.find("**/eyes"))
self.openSmile = DirectFrame(parent=self.container, relief=None, image=gui.find("**/open_smile"))
self.tooth1 = DirectFrame(parent=self.openSmile, relief=None, image=gui.find("**/tooth_1"))
self.tooth2 = DirectFrame(parent=self.openSmile, relief=None, image=gui.find("**/tooth_2"))
self.tooth3 = DirectFrame(parent=self.openSmile, relief=None, image=gui.find("**/tooth_3"))
self.tooth4 = DirectFrame(parent=self.openSmile, relief=None, image=gui.find("**/tooth_4"))
self.tooth5 = DirectFrame(parent=self.openSmile, relief=None, image=gui.find("**/tooth_5"))
self.tooth6 = DirectFrame(parent=self.openSmile, relief=None, image=gui.find("**/tooth_6"))
self.maxLabel = DirectLabel(
parent=self.eyes,
relief=None,
pos=(0.442, 0, 0.051),
text="120",
text_scale=0.4,
text_font=ToontownGlobals.getInterfaceFont(),
)
self.hpLabel = DirectLabel(
parent=self.eyes,
relief=None,
pos=(-0.398, 0, 0.051),
text="120",
text_scale=0.4,
text_font=ToontownGlobals.getInterfaceFont(),
)
self.teeth = [self.tooth6, self.tooth5, self.tooth4, self.tooth3, self.tooth2, self.tooth1]
self.fractions = [0.0, 0.166666, 0.333333, 0.5, 0.666666, 0.833333]
gui.removeNode()
return
开发者ID:Wesley1000070,项目名称:Toontown-Crystal,代码行数:59,代码来源:LaffMeter.py
示例5: loadDnaStore
def loadDnaStore(self):
if not hasattr(self, 'dnaStore'):
self.dnaStore = DNAStorage()
files = ('phase_4/dna/storage.pdna', 'phase_3.5/dna/storage_interior.pdna')
dnaBulk = DNABulkLoader(self.dnaStore, files)
dnaBulk.loadDNAFiles()
self.dnaStore.storeFont('humanist', ToontownGlobals.getInterfaceFont())
self.dnaStore.storeFont('mickey', ToontownGlobals.getSignFont())
self.dnaStore.storeFont('suit', ToontownGlobals.getSuitFont())
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:9,代码来源:PlayGame.py
示例6: loadNextGameTimer
def loadNextGameTimer(self):
self.nextGame = DirectLabel(parent=self, relief=None, text='', text_font=ToontownGlobals.getSignFont(), text_scale=TTLocalizer.BCGnextGame * BG.CardImageScale[2], text_fg=(1.0, 1.0, 1.0, 1), pos=(BG.GridXOffset, 0, 4 * BG.CardImageScale[2]))
self.nextGameTimer = ToontownTimer.ToontownTimer()
self.nextGameTimer.reparentTo(self.nextGame)
self.nextGameTimer.setPos(0, 0, -5 * BG.CardImageScale[2])
self.nextGameTimer.setProp('image', None)
self.nextGameTimer.setProp('text_font', ToontownGlobals.getSignFont())
self.nextGameTimer.setProp('text_scale', 0.2 * BG.CardImageScale[2])
self.nextGameTimer.setFontColor(Vec4(1.0, 1.0, 1.0, 1))
return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:10,代码来源:BingoCardGui.py
示例7: enableRaceMode
def enableRaceMode(self):
self.enableSpeedometer()
self.render2dRoot.show()
self.raceModeRoot.show()
self.maxLapHit = min(self.maxLapHit, self.race.lapCount - 1)
for x in xrange(self.maxLapHit + 1):
for y in self.timeLabels[x]:
y.configure(text_font=ToontownGlobals.getSignFont())
y.show()
for y in self.timeLabels[self.maxLapHit]:
y.configure(text_font=ToontownGlobals.getSignFont())
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:12,代码来源:RaceGUI.py
示例8: loadGUI
def loadGUI(self):
self.gui = loader.loadModel('phase_13/models/parties/trampolineGUI')
self.gui.reparentTo(base.a2dTopLeft)
self.gui.setPos(0.115, 0, -1)
self.gui.hide()
self.toonIndicator = self.gui.find('**/trampolineGUI_MovingBar')
jumpLineLocator = self.gui.find('**/jumpLine_locator')
guiBean = self.gui.find('**/trampolineGUI_GreenJellyBean')
self.gui.find('**/trampolineGUI_GreenJellyBean').stash()
self.guiBeans = [ guiBean.instanceUnderNode(jumpLineLocator, self.uniqueName('guiBean%d' % i)) for i in xrange(self.numJellyBeans) ]
self.guiBeans[-1].setScale(1.5)
heightTextNode = TextNode(self.uniqueName('TrampolineActivity.heightTextNode'))
heightTextNode.setFont(ToontownGlobals.getSignFont())
heightTextNode.setAlign(TextNode.ALeft)
heightTextNode.setText('0.0')
heightTextNode.setShadow(0.05, 0.05)
heightTextNode.setShadowColor(0.0, 0.0, 0.0, 1.0)
heightTextNode.setTextColor(1.0, 1.0, 1.0, 1.0)
self.heightText = jumpLineLocator.attachNewNode(heightTextNode)
self.heightText.setX(0.15)
self.heightText.setScale(0.1)
self.heightText.setAlphaScale(0.0)
self.quitEarlyButtonModels = loader.loadModel('phase_3.5/models/gui/inventory_gui')
quitEarlyUp = self.quitEarlyButtonModels.find('**//InventoryButtonUp')
quitEarlyDown = self.quitEarlyButtonModels.find('**/InventoryButtonDown')
quitEarlyRollover = self.quitEarlyButtonModels.find('**/InventoryButtonRollover')
self.quitEarlyButton = DirectButton(parent=base.a2dTopRight, relief=None, text=TTLocalizer.PartyTrampolineQuitEarlyButton, text_fg=(1, 1, 0.65, 1), text_pos=(0, -0.23), text_scale=0.7, image=(quitEarlyUp, quitEarlyDown, quitEarlyRollover), image_color=(1, 0, 0, 1), image_scale=(20, 1, 11), pos=(-0.183, 0, -0.4), scale=0.09, command=self.leaveTrampoline)
self.quitEarlyButton.stash()
self.flashText = OnscreenText(text='', pos=(0.0, -0.45), scale=0.2, fg=(1.0, 1.0, 0.65, 1.0), align=TextNode.ACenter, font=ToontownGlobals.getSignFont(), mayChange=True)
self.timer = PartyUtils.getNewToontownTimer()
self.timer.posInTopRightCorner()
return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:32,代码来源:DistributedPartyTrampolineActivity.py
示例9: __makeGallery
def __makeGallery(self):
self.gallery = hidden.attachNewNode('gallery')
self.gallery.setDepthWrite(1)
self.gallery.setDepthTest(1)
self.suits = []
self.actors = []
self.text = TextNode('rogues')
self.text.setFont(ToontownGlobals.getInterfaceFont())
self.text.setAlign(TextNode.ACenter)
self.text.setTextColor(0.0, 0.0, 0.0, 1.0)
self.rowHeight = 0.0
self.minXScale = None
print "rognamestr='", self.rognamestr, "'\n"
if self.rognamestr == None or len(self.rognamestr) == 0:
for dept in SuitDNA.suitDepts:
self.__makeDept(dept)
else:
self.suitRow = []
self.rowWidth = 0.0
self.__makeSuit(None, None, self.rognamestr)
self.minXScale = self.xRowSpace / self.rowWidth
self.suits.append((self.rowWidth, self.suitRow))
del self.suitRow
self.__rescaleSuits()
return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:26,代码来源:RoguesGallery.py
示例10: buildFrame
def buildFrame(self, name, dnaTuple):
frame = loader.loadModel('phase_3.5/models/modules/trophy_frame')
dna = ToonDNA.ToonDNA()
apply(dna.newToonFromProperties, dnaTuple)
head = ToonHead.ToonHead()
head.setupHead(dna)
head.setPosHprScale(0, -0.05, -0.05, 180, 0, 0, 0.55, 0.02, 0.55)
if dna.head[0] == 'r':
head.setZ(-0.15)
elif dna.head[0] == 'h':
head.setZ(0.05)
elif dna.head[0] == 'm':
head.setScale(0.45, 0.02, 0.45)
head.reparentTo(frame)
nameText = TextNode('trophy')
nameText.setFont(ToontownGlobals.getToonFont())
nameText.setAlign(TextNode.ACenter)
nameText.setTextColor(0, 0, 0, 1)
nameText.setWordwrap(5.36 * FrameScale)
nameText.setText(name)
namePath = frame.attachNewNode(nameText.generate())
namePath.setPos(0, -0.03, -.6)
namePath.setScale(0.186 / FrameScale)
frame.setScale(FrameScale, 1.0, FrameScale)
return frame
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:25,代码来源:DistributedToonInterior.py
示例11: checkBoard
def checkBoard(self, av):
dept = ToontownGlobals.cogHQZoneId2deptIndex(self.zone)
if av.hp < self.minLaff:
return REJECT_MINLAFF
if not av.readyForPromotion(dept):
return REJECT_PROMOTION
return 0
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:7,代码来源:DistributedBossElevatorAI.py
示例12: attachHostNameToSign
def attachHostNameToSign(self, locator):
if self.hostName == '':
return
nameText = TextNode('nameText')
nameText.setCardAsMargin(0.1, 0.1, 0.1, 0.1)
nameText.setCardDecal(True)
nameText.setCardColor(1.0, 1.0, 1.0, 0.0)
r = 232.0 / 255.0
g = 169.0 / 255.0
b = 23.0 / 255.0
nameText.setTextColor(r, g, b, 1)
nameText.setAlign(nameText.ACenter)
nameText.setFont(ToontownGlobals.getBuildingNametagFont())
nameText.setShadowColor(0, 0, 0, 1)
nameText.setBin('fixed')
if TTLocalizer.BuildingNametagShadow:
nameText.setShadow(*TTLocalizer.BuildingNametagShadow)
nameWordWrap = 11.0
nameText.setWordwrap(nameWordWrap)
scaleMult = 0.48
houseName = self.hostName
nameText.setText(houseName)
textWidth = nameText.getWidth()
xScale = 1.0 * scaleMult
if textWidth > nameWordWrap:
xScale = nameWordWrap / textWidth * scaleMult
sign_origin = locator
namePlate = sign_origin.attachNewNode(nameText)
namePlate.setDepthWrite(0)
namePlate.setPos(0, 0, 0)
namePlate.setScale(xScale)
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:31,代码来源:DistributedParty.py
示例13: load
def load(self):
gui = loader.loadModel('phase_3/models/gui/tt_m_gui_mat_mainGui')
shuffleFrame = gui.find('**/tt_t_gui_mat_shuffleFrame')
shuffleUp = gui.find('**/tt_t_gui_mat_shuffleUp')
shuffleDown = gui.find('**/tt_t_gui_mat_shuffleDown')
shuffleArrowUp = gui.find('**/tt_t_gui_mat_shuffleArrowUp')
shuffleArrowDown = gui.find('**/tt_t_gui_mat_shuffleArrowDown')
shuffleArrowDisabled = gui.find('**/tt_t_gui_mat_shuffleArrowDisabled')
gui.removeNode()
del gui
self.parentFrame = DirectFrame(parent=self.parent.parentFrame, relief=DGG.RAISED, pos=(0, 0, -1), frameColor=(1, 0, 0, 0))
self.shuffleFrame = DirectFrame(parent=self.parentFrame, image=shuffleFrame, image_scale=halfButtonInvertScale, relief=None, frameColor=(1, 1, 1, 1))
self.shuffleFrame.hide()
self.shuffleBtn = DirectButton(parent=self.parentFrame, relief=None, image=(shuffleUp, shuffleDown, shuffleUp), image_scale=halfButtonInvertScale, image1_scale=(-0.63, 0.6, 0.6), image2_scale=(-0.63, 0.6, 0.6), text=(TTLocalizer.ShuffleButton,
TTLocalizer.ShuffleButton,
TTLocalizer.ShuffleButton,
''), text_font=ToontownGlobals.getInterfaceFont(), text_scale=TTLocalizer.SBshuffleBtn, text_pos=(0, -0.02), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), command=self.chooseRandom)
self.incBtn = DirectButton(parent=self.parentFrame, relief=None, image=(shuffleArrowUp,
shuffleArrowDown,
shuffleArrowUp,
shuffleArrowDisabled), image_scale=halfButtonInvertScale, image1_scale=halfButtonInvertHoverScale, image2_scale=halfButtonInvertHoverScale, pos=(0.202, 0, 0), command=self.__goFrontHistory)
self.incBtn.hide()
self.decBtn = DirectButton(parent=self.parentFrame, relief=None, image=(shuffleArrowUp,
shuffleArrowDown,
shuffleArrowUp,
shuffleArrowDisabled), image_scale=halfButtonScale, image1_scale=halfButtonHoverScale, image2_scale=halfButtonHoverScale, pos=(-0.202, 0, 0), command=self.__goBackHistory)
self.decBtn.hide()
self.lerpDuration = 0.5
self.showLerp = None
self.frameShowLerp = LerpColorInterval(self.shuffleFrame, self.lerpDuration, Vec4(1, 1, 1, 1), Vec4(1, 1, 1, 0))
self.incBtnShowLerp = LerpColorInterval(self.incBtn, self.lerpDuration, Vec4(1, 1, 1, 1), Vec4(1, 1, 1, 0))
self.decBtnShowLerp = LerpColorInterval(self.decBtn, self.lerpDuration, Vec4(1, 1, 1, 1), Vec4(1, 1, 1, 0))
self.__updateArrows()
return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:34,代码来源:ShuffleButton.py
示例14: __init__
def __init__(self, genus = None, itemIndex = 0, *extraArgs):
fishingGui = loader.loadModel('phase_3.5/models/gui/fishingBook')
albumGui = fishingGui.find('**/photo_frame1').copyTo(hidden)
albumGui.find('**/picture_frame').reparentTo(albumGui, -1)
albumGui.find('**/arrows').removeNode()
optiondefs = (('relief', None, None),
('state', DGG.NORMAL, None),
('image', albumGui, None),
('image_scale', (0.025, 0.025, 0.025), None),
('image_pos', (0, 1, 0), None),
('text', TTLocalizer.UnknownFish, None),
('text_scale', 0.065, None),
('text_fg', (0.2, 0.1, 0.0, 1), None),
('text_pos', (-0.5, -0.34), None),
('text_font', ToontownGlobals.getInterfaceFont(), None),
('text_wordwrap', 13.5, None),
('text_align', TextNode.ALeft, None))
self.defineoptions({}, optiondefs)
DirectFrame.__init__(self)
self.initialiseoptions(GenusPanel)
self.fishPanel = None
self.genus = None
self.setGenus(int(genus))
self.setScale(1.2)
albumGui.removeNode()
return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:26,代码来源:GenusPanel.py
示例15: setupEndSection
def setupEndSection(self, index):
aspectSF = 0.7227
self.endSectionNP = NodePath('EndSection')
self.endSectionNP.reparentTo(self.game.assetMgr.world)
self.endSectionNP.setX(self.incrementX)
self.endWall = self.game.assetMgr.startingWall.copyTo(self.endSectionNP)
self.endWall.setPos(100, 0, 4)
self.endWall.setScale(0.8)
self.endArrow = self.game.assetMgr.arrow.copyTo(self.endSectionNP)
self.endArrow.setPos(6, 1.5, 12.76)
self.exitElevator = self.game.assetMgr.exitElevator.copyTo(self.endSectionNP)
self.exitElevator.setPos(52, -2, 12.7)
cogSignModel = loader.loadModel('phase_4/models/props/sign_sellBotHeadHQ')
cogSign = cogSignModel.find('**/sign_sellBotHeadHQ')
cogSignSF = 23
elevatorSignSF = 15
sideDoor = self.exitElevator.find('**/doorway2')
sdSign = cogSign.copyTo(sideDoor)
sdSign.setPosHprScale(0, 1.9, 15, 0, 0, 0, elevatorSignSF, elevatorSignSF, elevatorSignSF * aspectSF)
sdSign.node().setEffect(DecalEffect.make())
sdText = DirectGui.OnscreenText(text=TTLocalizer.TwoDGameElevatorExit, font=ToontownGlobals.getSuitFont(), pos=(0, -0.34), scale=0.15, mayChange=False, parent=sdSign)
sdText.setDepthWrite(0)
self.sectionNPList.append(self.endSectionNP)
endSectionInfo = ('end',
[],
[],
[0],
[])
endSection = TwoDSection.TwoDSection(index, endSectionInfo, self.endSectionNP, self)
self.sections.append(endSection)
self.incrementX += endSection.length
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:31,代码来源:TwoDSectionMgr.py
示例16: getTimer
def getTimer(self, parent):
timeFont = ToontownGlobals.getMinnieFont()
timer = {}
timer['minute'] = DirectLabel(parent=parent, pos=TTLocalizer.DPtimerMinutePos, relief=None, text='59', text_align=TextNode.ACenter, text_font=timeFont, text_fg=(0.7, 0.3, 0.3, 1.0), scale=TTLocalizer.DPtimerMinute)
timer['colon'] = DirectLabel(parent=parent, pos=TTLocalizer.DPtimerColonPos, relief=None, text=':', text_align=TextNode.ACenter, text_font=timeFont, text_fg=(0.7, 0.3, 0.3, 1.0), scale=TTLocalizer.DPtimerColon)
timer['second'] = DirectLabel(parent=parent, relief=None, pos=TTLocalizer.DPtimerSecondPos, text='14', text_align=TextNode.ACenter, text_font=timeFont, text_fg=(0.7, 0.3, 0.3, 1.0), scale=TTLocalizer.DPtimerSecond)
timer['textLabel'] = DirectLabel(parent=parent, relief=None, pos=(0.0, 0.0, 1.15), text=TTLocalizer.PartyCountdownClockText, text_font=timeFont, text_fg=(0.7, 0.3, 0.3, 1.0), scale=TTLocalizer.DPtimerTextLabel)
return timer
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:8,代码来源:DistributedParty.py
示例17: load
def load(self):
gui = loader.loadModel("phase_3/models/gui/tt_m_gui_mat_mainGui")
guiBoyUp = gui.find("**/tt_t_gui_mat_boyUp")
guiBoyDown = gui.find("**/tt_t_gui_mat_boyDown")
guiGirlUp = gui.find("**/tt_t_gui_mat_girlUp")
guiGirlDown = gui.find("**/tt_t_gui_mat_girlDown")
self.boyButton = DirectButton(
relief=None,
image=(guiBoyUp, guiBoyDown, guiBoyUp, guiBoyDown),
image_scale=halfButtonScale,
image1_scale=halfButtonHoverScale,
image2_scale=halfButtonHoverScale,
pos=(-0.4, 0, -0.8),
command=self.createRandomBoy,
text=("", TTLocalizer.GenderShopBoyButtonText, TTLocalizer.GenderShopBoyButtonText, ""),
text_font=ToontownGlobals.getInterfaceFont(),
text_scale=0.08,
text_pos=(0, 0.19),
text_fg=(1, 1, 1, 1),
text_shadow=(0, 0, 0, 1),
)
self.boyButton.hide()
self.boyButton.setPos(-0.45, 0, 0.19)
self.boyButton.reparentTo(base.a2dBottomCenter)
self.girlButton = DirectButton(
relief=None,
image=(guiGirlUp, guiGirlDown, guiGirlUp, guiGirlDown),
image_scale=halfButtonScale,
image1_scale=halfButtonHoverScale,
image2_scale=halfButtonHoverScale,
pos=(0.4, 0, -0.8),
command=self.createRandomGirl,
text=("", TTLocalizer.GenderShopGirlButtonText, TTLocalizer.GenderShopGirlButtonText, ""),
text_font=ToontownGlobals.getInterfaceFont(),
text_scale=0.08,
text_pos=(0, 0.19),
text_fg=(1, 1, 1, 1),
text_shadow=(0, 0, 0, 1),
)
self.girlButton.hide()
self.girlButton.setPos(0.45, 0, 0.19)
self.girlButton.reparentTo(base.a2dBottomCenter)
gui.removeNode()
del gui
self.toon = None
return
开发者ID:Wesley1000070,项目名称:Toontown-Crystal,代码行数:46,代码来源:GenderShop.py
示例18: initToonState
def initToonState(self):
self.setAnimState('neutral', 0.9, None, None)
self.putOnSuit(ToontownGlobals.cogHQZoneId2deptIndex(self.zoneId), rental=True)
if self.name in NPCToons.LaffRestockPositions:
pos = NPCToons.LaffRestockPositions[self.name]
self.setPos(*pos[0])
self.setH(pos[1])
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:8,代码来源:DistributedNPCLaffRestock.py
示例19: __initTallyDisplay
def __initTallyDisplay(self):
self.__tallyTextNode = TextNode('tally')
self.__tallyTextNode.setFont(ToontownGlobals.getSignFont())
self.__tallyTextNode.setAlign(TextNode.ACenter)
self.tallyMarkers = [None] * self.__numRingGroups
for i in xrange(0, self.__numRingGroups):
self.__createTallyMarker(i, self.RT_UNKNOWN)
return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:9,代码来源:DistributedRingGame.py
示例20: flipText
def flipText(flip, label = self.entryList[place - 1][3], timeStr = timeStr, recStr = TTLocalizer.KartRace_Record):
self.entryList[place - 1][3].configure(text_scale=0.06)
self.entryList[place - 1][3].configure(text_fg=(0.95, 0.0, 0.0, 1.0))
if flip:
self.entryList[place - 1][3].configure(text_font=DGG.getDefaultFont())
self.entryList[place - 1][3]['text'] = timeStr
else:
self.entryList[place - 1][3].configure(text_font=ToontownGlobals.getSignFont())
self.entryList[place - 1][3]['text'] = recStr
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:9,代码来源:RaceEndPanels.py
注:本文中的src.toontown.toonbase.ToontownGlobals类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论