本文整理汇总了Python中toontown.toonbase.ToontownGlobals.getSuitFont方法的典型用法代码示例。如果您正苦于以下问题:Python ToontownGlobals.getSuitFont方法的具体用法?Python ToontownGlobals.getSuitFont怎么用?Python ToontownGlobals.getSuitFont使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.toonbase.ToontownGlobals
的用法示例。
在下文中一共展示了ToontownGlobals.getSuitFont方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def __init__(self, cr):
DistributedObject.DistributedObject.__init__(self, cr)
Level.Level.__init__(self)
self.lastToonZone = None
self.lastCamZone = 0
self.titleColor = (1, 1, 1, 1)
self.titleText = OnscreenText.OnscreenText(
"",
fg=self.titleColor,
shadow=(0, 0, 0, 1),
font=ToontownGlobals.getSuitFont(),
pos=(0, -0.5),
scale=0.16,
drawOrder=0,
mayChange=1,
)
self.smallTitleText = OnscreenText.OnscreenText(
"",
fg=self.titleColor,
font=ToontownGlobals.getSuitFont(),
pos=(0.65000000000000002, 0.90000000000000002),
scale=0.080000000000000002,
drawOrder=0,
mayChange=1,
bg=(0.5, 0.5, 0.5, 0.5),
align=TextNode.ARight,
)
self.zonesEnteredList = []
self.fColorZones = 0
self.scenarioIndex = 0
示例2: __init__
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
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
示例3: __init__
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
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 = SuitHealthBar.SuitHealthBar()
self.animDoneEvent = 'BossCogAnimDone'
self.animIvalName = 'BossCogAnimIval'
self.warningSfx = loader.loadSfx('phase_9/audio/sfx/CHQ_GOON_tractor_beam_alarmed.ogg')
示例4: __init__
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def __init__(self, cr):
DistributedObject.DistributedObject.__init__(self, cr)
self.toons = []
self.activeIntervals = {}
self.openSfx = base.loadSfx('phase_5/audio/sfx/elevator_door_open.ogg')
self.closeSfx = base.loadSfx('phase_5/audio/sfx/elevator_door_close.ogg')
self.suits = []
self.reserveSuits = []
self.joiningReserves = []
self.distBldgDoId = None
self.currentFloor = -1
self.numFloors = None
self.elevatorName = self.__uniqueName('elevator')
self.floorModel = None
self.elevatorOutOpen = 0
self.BottomFloor_SuitPositions = [Point3(0, 15, 0),
Point3(10, 20, 0),
Point3(-7, 24, 0),
Point3(-10, 0, 0)]
self.BottomFloor_SuitHs = [75,
170,
-91,
-44]
self.Cubicle_SuitPositions = [Point3(0, 18, 0),
Point3(10, 12, 0),
Point3(-9, 11, 0),
Point3(-3, 13, 0)]
self.Cubicle_SuitHs = [170,
56,
-52,
10]
self.BossOffice_SuitPositions = [Point3(0, 15, 0),
Point3(10, 20, 0),
Point3(-10, 6, 0),
Point3(-17, 34, 11)]
self.BossOffice_SuitHs = [170,
120,
12,
38]
self.defaultcou = 1
self.cou = TextNode('counter')
self.coupath = aspect2d.attachNewNode(self.cou)
self.coupath.setScale(0.09)
self.coupath.setPos(0.9, 0, -0.9)
self.cou.setFont(ToontownGlobals.getSuitFont())
self.cou.setCardColor(1e-05, 1e-05, 1e-05, 0.3)
self.cou.setCardAsMargin(0.3, 0.3, 0.2, 0.2)
self.cou.setCardDecal(True)
self.waitMusic = base.loadMusic('phase_7/audio/bgm/encntr_toon_winning_indoor.ogg')
self.elevatorMusic = base.loadMusic('phase_7/audio/bgm/tt_elevator.ogg')
self.fsm = ClassicFSM.ClassicFSM('DistributedSuitInterior', [State.State('WaitForAllToonsInside', self.enterWaitForAllToonsInside, self.exitWaitForAllToonsInside, ['Elevator']),
State.State('Elevator', self.enterElevator, self.exitElevator, ['Battle']),
State.State('purchase', ClerkPurchase.ClerkPurchase.enterPurchase, ClerkPurchase.ClerkPurchase.exitPurchase, ['walk', 'doorOut']),
State.State('Battle', self.enterBattle, self.exitBattle, ['Resting', 'Reward', 'ReservesJoining']),
State.State('ReservesJoining', self.enterReservesJoining, self.exitReservesJoining, ['Battle']),
State.State('Resting', self.enterResting, self.exitResting, ['Elevator']),
State.State('Reward', self.enterReward, self.exitReward, ['Off']),
State.State('Off', self.enterOff, self.exitOff, ['Elevator', 'WaitForAllToonsInside', 'Battle'])], 'Off', 'Off')
self.fsm.enterInitialState()
return
示例5: setupEndSection
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
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
示例6: loadPlaceGeom
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def loadPlaceGeom(self, zoneId):
self.notify.info("loadPlaceGeom: %s" % zoneId)
zoneId = zoneId - zoneId % 100
if zoneId == ToontownGlobals.CashbotHQ:
self.geom = loader.loadModel(self.cogHQExteriorModelPath)
ddLinkTunnel = self.geom.find("**/LinkTunnel1")
ddLinkTunnel.setName("linktunnel_dl_9252_DNARoot")
locator = self.geom.find("**/sign_origin")
backgroundGeom = self.geom.find("**/EntranceFrameFront")
backgroundGeom.node().setEffect(DecalEffect.make())
signText = DirectGui.OnscreenText(
text=TTLocalizer.DonaldsDreamland[-1],
font=ToontownGlobals.getSuitFont(),
scale=3,
fg=(0.87, 0.87, 0.87, 1),
mayChange=False,
parent=backgroundGeom,
)
signText.setPosHpr(locator, 0, 0, 0, 0, 0, 0)
signText.setDepthWrite(0)
elif zoneId == ToontownGlobals.CashbotLobby:
if config.GetBool("want-qa-regression", 0):
self.notify.info("QA-REGRESSION: COGHQ: Visit CashbotLobby")
self.geom = loader.loadModel(self.cogHQLobbyModelPath)
else:
self.notify.warning("loadPlaceGeom: unclassified zone %s" % zoneId)
CogHQLoader.CogHQLoader.loadPlaceGeom(self, zoneId)
示例7: __init__
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def __init__(self, withinTTH=False):
FSM.__init__(self, "FNAFBase")
self.withinTTH = withinTTH
if not self.withinTTH:
base.cogFont = loader.loadFont('data/vtRemingtonPortable.ttf')
base.accept("escape", self.handleEsc)
base.accept("f9", self.screenshot)
else:
from toontown.toonbase import ToontownGlobals
base.cogFont = ToontownGlobals.getSuitFont()
base.level = Level()
base.timer = Timer()
base.camControls = CameraControls()
if not self.withinTTH:
self.handleGotPhases()
self.ray = CollisionRay()
cNode = CollisionNode('mousePicker')
cNode.addSolid(self.ray)
cNode.setCollideMask(BitMask32(8))
self.cnp = base.cam.attachNewNode(cNode)
self.handler = CollisionHandlerQueue()
self.clickTrav = CollisionTraverser('cTrav')
self.clickTrav.addCollider(self.cnp, self.handler)
base.accept('mouse1', self.__handleClick)
self.night = 1
示例8: setMintId
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def setMintId(self, mintId):
self.mintId = mintId
mintId2originId = {
ToontownGlobals.CashbotMintIntA: 1,
ToontownGlobals.CashbotMintIntB: 2,
ToontownGlobals.CashbotMintIntC: 0,
}
originId = mintId2originId[self.mintId]
geom = self.cr.playGame.hood.loader.geom
locator = geom.find("**/elevator_origin_%s" % originId)
if locator:
self.elevatorModel.setPosHpr(locator, 0, 0, 0, 0, 0, 0)
else:
self.notify.error("No origin found for originId: %s" % originId)
locator = geom.find("**/elevator_signorigin_%s" % originId)
backgroundGeom = geom.find("**/ElevatorFrameFront_%d" % originId)
backgroundGeom.node().setEffect(DecalEffect.make())
signText = DirectGui.OnscreenText(
text=TextEncoder.upper(TTLocalizer.GlobalStreetNames[mintId][-1]),
font=ToontownGlobals.getSuitFont(),
scale=TTLocalizer.DMEEsignText,
fg=(0.87, 0.87, 0.87, 1),
mayChange=False,
parent=backgroundGeom,
)
signText.setPosHpr(locator, 0, 0, 0, 0, 0, 0)
signText.setDepthWrite(0)
示例9: loadDnaStore
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def loadDnaStore(self):
if not hasattr(self, 'dnaStore'):
self.dnaStore = DNAStorage()
loader.loadDNAFile(self.dnaStore, 'phase_4/dna/storage.dna')
self.dnaStore.storeFont('humanist', ToontownGlobals.getInterfaceFont())
self.dnaStore.storeFont('mickey', ToontownGlobals.getSignFont())
self.dnaStore.storeFont('suit', ToontownGlobals.getSuitFont())
loader.loadDNAFile(self.dnaStore, 'phase_3.5/dna/storage_interior.dna')
示例10: loadDnaStore
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
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())
示例11: getFontByName
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def getFontByName(self, fontname):
if fontname == "toon":
return ToontownGlobals.getToonFont()
elif fontname == "building":
return ToontownGlobals.getBuildingNametagFont()
elif fontname == "minnie":
return ToontownGlobals.getMinnieFont()
elif fontname == "suit":
return ToontownGlobals.getSuitFont()
else:
return MagicWordManager.MagicWordManager.getFontByName(self, fontname)
示例12: loadDnaStore
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def loadDnaStore(self):
if not hasattr(self, 'dnaStore'):
self.dnaStore = DNAStorage()
loader.loadDNA('phase_4/dna/storage.xml').store(self.dnaStore)
self.dnaStore.storeFont(ToontownGlobals.getInterfaceFont(), 'humanist')
self.dnaStore.storeFont(ToontownGlobals.getSignFont(), 'mickey')
self.dnaStore.storeFont(ToontownGlobals.getSuitFont(), 'suit')
loader.loadDNA('phase_3.5/dna/storage_interior.xml').store(self.dnaStore)
示例13: __init__
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def __init__(self):
try:
self.Suit_initialized
return
except:
self.Suit_initialized = 1
Avatar.Avatar.__init__(self)
self.setFont(ToontownGlobals.getSuitFont())
self.nametag.setSpeechFont(ToontownGlobals.getSuitFont())
self.setPlayerType(NametagGroup.CCSuit)
self.setPickable(1)
self.leftHand = None
self.rightHand = None
self.shadowJoint = None
self.nametagJoint = None
self.headParts = []
self.healthBar = SuitHealthBar.SuitHealthBar()
self.isDisguised = 0
self.isWaiter = 0
self.isRental = 0
示例14: makeSign
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def makeSign(topStr, signStr, textId):
top = self.geom.find("**/" + topStr)
sign = top.find("**/" + signStr)
locator = top.find("**/sign_origin")
signText = DirectGui.OnscreenText(
text=TextEncoder.upper(TTLocalizer.GlobalStreetNames[textId][-1]),
font=ToontownGlobals.getSuitFont(),
scale=TTLocalizer.BCHQLsignText,
fg=(0, 0, 0, 1),
parent=sign,
)
signText.setPosHpr(locator, 0, -0.1, -0.25, 0, 0, 0)
signText.setDepthWrite(0)
示例15: addCogRadarLabel
# 需要导入模块: from toontown.toonbase import ToontownGlobals [as 别名]
# 或者: from toontown.toonbase.ToontownGlobals import getSuitFont [as 别名]
def addCogRadarLabel(self, panel):
cogRadarLabel = DirectLabel(
parent=panel,
pos=(0.0, 0.0, -0.215),
relief=None,
state=DGG.DISABLED,
text="",
text_scale=0.05,
text_fg=(0, 0, 0, 1),
text_font=ToontownGlobals.getSuitFont(),
)
panel.cogRadarLabel = cogRadarLabel
return