本文整理汇总了Python中toontown.safezone.SafeZoneLoader.SafeZoneLoader.load方法的典型用法代码示例。如果您正苦于以下问题:Python SafeZoneLoader.load方法的具体用法?Python SafeZoneLoader.load怎么用?Python SafeZoneLoader.load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.safezone.SafeZoneLoader.SafeZoneLoader
的用法示例。
在下文中一共展示了SafeZoneLoader.load方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: load
# 需要导入模块: from toontown.safezone.SafeZoneLoader import SafeZoneLoader [as 别名]
# 或者: from toontown.safezone.SafeZoneLoader.SafeZoneLoader import load [as 别名]
def load(self):
SafeZoneLoader.load(self)
if base.cr.newsManager:
holidayIds = base.cr.newsManager.getDecorationHolidayId()
if ToontownGlobals.CRASHED_LEADERBOARD in holidayIds:
self.startSmokeEffect()
self.birdSound = map(base.loadSfx, ['phase_4/audio/sfx/SZ_TC_bird1.mp3', 'phase_4/audio/sfx/SZ_TC_bird2.mp3', 'phase_4/audio/sfx/SZ_TC_bird3.mp3'])
示例2: load
# 需要导入模块: from toontown.safezone.SafeZoneLoader import SafeZoneLoader [as 别名]
# 或者: from toontown.safezone.SafeZoneLoader.SafeZoneLoader import load [as 别名]
def load(self):
SafeZoneLoader.load(self)
self.birdSound = map(
base.loadSfx,
[
"phase_4/audio/sfx/SZ_TC_bird1.ogg",
"phase_4/audio/sfx/SZ_TC_bird2.ogg",
"phase_4/audio/sfx/SZ_TC_bird3.ogg",
],
)
示例3: load
# 需要导入模块: from toontown.safezone.SafeZoneLoader import SafeZoneLoader [as 别名]
# 或者: from toontown.safezone.SafeZoneLoader.SafeZoneLoader import load [as 别名]
def load(self):
self.done = 0
self.geyserTrack = None
SafeZoneLoader.load(self)
self.birdSound = map(base.loader.loadSfx, ['phase_4/audio/sfx/SZ_TC_bird1.ogg', 'phase_4/audio/sfx/SZ_TC_bird2.ogg', 'phase_4/audio/sfx/SZ_TC_bird3.ogg'])
self.underwaterSound = base.loader.loadSfx('phase_4/audio/sfx/AV_ambient_water.ogg')
self.swimSound = base.loader.loadSfx('phase_4/audio/sfx/AV_swim_single_stroke.ogg')
self.submergeSound = base.loader.loadSfx('phase_5.5/audio/sfx/AV_jump_in_water.ogg')
geyserPlacer = self.geom.find('**/geyser*')
waterfallPlacer = self.geom.find('**/waterfall*')
binMgr = CullBinManager.getGlobalPtr()
binMgr.addBin('water', CullBinManager.BTFixed, 29)
binMgr = CullBinManager.getGlobalPtr()
water = self.geom.find('**/water1*')
water.setTransparency(1)
water.setColorScale(1, 1, 1, 1)
water.setBin('water', 51, 1)
pool = self.geom.find('**/pPlane5*')
pool.setTransparency(1)
pool.setColorScale(1.0, 1.0, 1.0, 1.0)
pool.setBin('water', 50, 1)
self.geyserModel = loader.loadModel('phase_6/models/golf/golf_geyser_model')
self.geyserSound = loader.loadSfx('phase_6/audio/sfx/OZ_Geyser.ogg')
self.geyserSoundInterval = SoundInterval(self.geyserSound, node=geyserPlacer, listenerNode=base.camera, seamlessLoop=False, volume=1.0, cutOff=120)
self.geyserSoundNoToon = loader.loadSfx('phase_6/audio/sfx/OZ_Geyser_No_Toon.ogg')
self.geyserSoundNoToonInterval = SoundInterval(self.geyserSoundNoToon, node=geyserPlacer, listenerNode=base.camera, seamlessLoop=False, volume=1.0, cutOff=120)
if self.geyserModel:
self.geyserActor = Actor.Actor(self.geyserModel)
self.geyserActor.loadAnims({'idle': 'phase_6/models/golf/golf_geyser'})
self.geyserActor.reparentTo(render)
self.geyserActor.setPlayRate(8.6, 'idle')
self.geyserActor.loop('idle')
self.geyserActor.setDepthWrite(0)
self.geyserActor.setTwoSided(True, 11)
self.geyserActor.setColorScale(1.0, 1.0, 1.0, 1.0)
self.geyserActor.setBin('fixed', 0)
mesh = self.geyserActor.find('**/mesh_tide1')
joint = self.geyserActor.find('**/uvj_WakeWhiteTide1')
mesh.setTexProjector(mesh.findTextureStage('default'), joint, self.geyserActor)
self.geyserActor.setPos(geyserPlacer.getPos())
self.geyserActor.setZ(geyserPlacer.getZ() - 100.0)
self.geyserPos = geyserPlacer.getPos()
self.geyserPlacer = geyserPlacer
self.startGeyser()
base.sfxPlayer.setCutoffDistance(160)
self.geyserPoolSfx = loader.loadSfx('phase_6/audio/sfx/OZ_Geyser_BuildUp_Loop.ogg')
self.geyserPoolSoundInterval = SoundInterval(self.geyserPoolSfx, node=self.geyserPlacer, listenerNode=base.camera, seamlessLoop=True, volume=1.0, cutOff=120)
self.geyserPoolSoundInterval.loop()
self.bubbles = Bubbles.Bubbles(self.geyserPlacer, render)
self.bubbles.renderParent.setDepthWrite(0)
self.bubbles.start()
self.collBase = render.attachNewNode('collisionBase')
self.geyserCollSphere = CollisionSphere(0, 0, 0, 7.5)
self.geyserCollSphere.setTangible(1)
self.geyserCollNode = CollisionNode('barrelSphere')
self.geyserCollNode.setIntoCollideMask(OTPGlobals.WallBitmask)
self.geyserCollNode.addSolid(self.geyserCollSphere)
self.geyserNodePath = self.collBase.attachNewNode(self.geyserCollNode)
self.geyserNodePath.setPos(self.geyserPos[0], self.geyserPos[1], self.geyserPos[2] - 100.0)
self.waterfallModel = loader.loadModel('phase_6/models/golf/golf_waterfall_model')
if self.waterfallModel:
self.waterfallActor = Actor.Actor(self.waterfallModel)
self.waterfallActor.loadAnims({'idle': 'phase_6/models/golf/golf_waterfall'})
self.waterfallActor.reparentTo(render)
self.waterfallActor.setPlayRate(3.5, 'idle')
self.waterfallActor.loop('idle')
mesh = self.waterfallActor.find('**/mesh_tide1')
joint = self.waterfallActor.find('**/uvj_WakeWhiteTide1')
mesh.setTexProjector(mesh.findTextureStage('default'), joint, self.waterfallActor)
self.waterfallActor.setPos(waterfallPlacer.getPos())
self.accept('clientLogout', self._handleLogout)
# If Chestnut Park is under construction, create the construction site:
if base.config.GetBool('want-chestnut-park-construction', False):
self.constructionSite = render.attachNewNode('constructionSite')
self.constructionSiteBlocker = self.constructionSite.attachNewNode(CollisionNode('constructionSiteBlocker'))
self.constructionSiteBlocker.setPos(-48, -154.5, 0)
self.constructionSiteBlocker.node().addSolid(CollisionSphere(0, 0, 0, 35))
self.coneModel = loader.loadModel('phase_3.5/models/props/unpainted_barrier_cone.bam')
self.cone0 = Actor.Actor(self.coneModel)
self.cone0.loadAnims({'jumptwist': 'phase_3.5/models/props/barrier_cone_chan_jumptwist.bam'})
self.cone0.reparentTo(self.constructionSite)
self.cone0.loop('jumptwist')
self.cone0.setPos(-43, -142, 0.025)
self.cone1 = Actor.Actor(self.coneModel)
self.cone1.loadAnims({'walktrip': 'phase_3.5/models/props/barrier_cone_chan_walktrip.bam'})
self.cone1.reparentTo(self.constructionSite)
self.cone1.loop('walktrip')
self.cone1.setPos(-52, -145, 0.025)
self.ladder = loader.loadModel('phase_5/models/props/ladder2.bam')
self.ladder.reparentTo(self.constructionSite)
self.ladder.setPosHpr(-36.460, -130.828, 0.30, 61, -90, 0)
self.ladder.find('**/shadow').removeNode()
self.paintersWantedSign = loader.loadModel('phase_6/models/props/tti_painters_wanted_sign.bam')
#.........这里部分代码省略.........
示例4: load
# 需要导入模块: from toontown.safezone.SafeZoneLoader import SafeZoneLoader [as 别名]
# 或者: from toontown.safezone.SafeZoneLoader.SafeZoneLoader import load [as 别名]
def load(self):
SafeZoneLoader.load(self)
self.birdSound = map(base.loadSfx, ['phase_4/audio/sfx/SZ_TC_bird1.mp3', 'phase_4/audio/sfx/SZ_TC_bird2.mp3', 'phase_4/audio/sfx/SZ_TC_bird3.mp3'])
示例5: load
# 需要导入模块: from toontown.safezone.SafeZoneLoader import SafeZoneLoader [as 别名]
# 或者: from toontown.safezone.SafeZoneLoader.SafeZoneLoader import load [as 别名]
def load(self):
self.done = 0
self.geyserTrack = None
SafeZoneLoader.load(self)
self.birdSound = map(base.loadSfx, ['phase_4/audio/sfx/SZ_TC_bird1.ogg', 'phase_4/audio/sfx/SZ_TC_bird2.ogg', 'phase_4/audio/sfx/SZ_TC_bird3.ogg'])
self.underwaterSound = base.loadSfx('phase_4/audio/sfx/AV_ambient_water.ogg')
self.swimSound = base.loadSfx('phase_4/audio/sfx/AV_swim_single_stroke.ogg')
self.submergeSound = base.loadSfx('phase_5.5/audio/sfx/AV_jump_in_water.ogg')
geyserPlacer = self.geom.find('**/geyser*')
waterfallPlacer = self.geom.find('**/waterfall*')
binMgr = CullBinManager.getGlobalPtr()
binMgr.addBin('water', CullBinManager.BTFixed, 29)
water = self.geom.find('**/water1*')
water.setTransparency(1)
water.setColorScale(1.0, 1.0, 1.0, 1.0)
water.setBin('water', 51, 1)
pool = self.geom.find('**/pPlane5*')
pool.setTransparency(1)
pool.setColorScale(1.0, 1.0, 1.0, 1.0)
pool.setBin('water', 50, 1)
self.geyserModel = loader.loadModel('phase_6/models/golf/golf_geyser_model')
self.geyserSound = loader.loadSfx('phase_6/audio/sfx/OZ_Geyser.ogg')
self.geyserSoundInterval = SoundInterval(self.geyserSound, node=geyserPlacer, listenerNode=base.camera, seamlessLoop=False, volume=1.0, cutOff=120)
self.geyserSoundNoToon = loader.loadSfx('phase_6/audio/sfx/OZ_Geyser_No_Toon.ogg')
self.geyserSoundNoToonInterval = SoundInterval(self.geyserSoundNoToon, node=geyserPlacer, listenerNode=base.camera, seamlessLoop=False, volume=1.0, cutOff=120)
if self.geyserModel:
self.geyserActor = Actor.Actor(self.geyserModel)
self.geyserActor.loadAnims({'idle': 'phase_6/models/golf/golf_geyser'})
self.geyserActor.reparentTo(render)
self.geyserActor.setPlayRate(8.6, 'idle')
self.geyserActor.loop('idle')
self.geyserActor.setDepthWrite(0)
self.geyserActor.setTwoSided(True, 11)
self.geyserActor.setColorScale(1.0, 1.0, 1.0, 1.0)
self.geyserActor.setBin('fixed', 0)
mesh = self.geyserActor.find('**/mesh_tide1')
joint = self.geyserActor.find('**/uvj_WakeWhiteTide1')
mesh.setTexProjector(mesh.findTextureStage('default'), joint, self.geyserActor)
self.geyserActor.setPos(geyserPlacer.getPos())
self.geyserActor.setZ(geyserPlacer.getZ() - 100.0)
self.geyserPos = geyserPlacer.getPos()
self.geyserPlacer = geyserPlacer
self.startGeyser()
base.sfxPlayer.setCutoffDistance(160)
self.geyserPoolSfx = loader.loadSfx('phase_6/audio/sfx/OZ_Geyser_BuildUp_Loop.ogg')
self.geyserPoolSoundInterval = SoundInterval(self.geyserPoolSfx, node=self.geyserPlacer, listenerNode=base.camera, seamlessLoop=True, volume=1.0, cutOff=120)
self.geyserPoolSoundInterval.loop()
self.bubbles = Bubbles.Bubbles(self.geyserPlacer, render)
self.bubbles.renderParent.setDepthWrite(0)
self.bubbles.start()
self.collBase = render.attachNewNode('collisionBase')
self.geyserCollSphere = CollisionSphere(0, 0, 0, 7.5)
self.geyserCollSphere.setTangible(1)
self.geyserCollNode = CollisionNode('barrelSphere')
self.geyserCollNode.setIntoCollideMask(OTPGlobals.WallBitmask)
self.geyserCollNode.addSolid(self.geyserCollSphere)
self.geyserNodePath = self.collBase.attachNewNode(self.geyserCollNode)
self.geyserNodePath.setPos(self.geyserPos[0], self.geyserPos[1], self.geyserPos[2] - 100.0)
self.waterfallModel = loader.loadModel('phase_6/models/golf/golf_waterfall_model')
if self.waterfallModel:
self.waterfallActor = Actor.Actor(self.waterfallModel)
self.waterfallActor.loadAnims({'idle': 'phase_6/models/golf/golf_waterfall'})
self.waterfallActor.reparentTo(render)
self.waterfallActor.setPlayRate(3.5, 'idle')
self.waterfallActor.loop('idle')
mesh = self.waterfallActor.find('**/mesh_tide1')
joint = self.waterfallActor.find('**/uvj_WakeWhiteTide1')
mesh.setTexProjector(mesh.findTextureStage('default'), joint, self.waterfallActor)
self.waterfallActor.setPos(waterfallPlacer.getPos())
self.accept('clientLogout', self._handleLogout)
return