本文整理汇总了Python中toontown.building.ElevatorUtils.getRideElevatorInterval方法的典型用法代码示例。如果您正苦于以下问题:Python ElevatorUtils.getRideElevatorInterval方法的具体用法?Python ElevatorUtils.getRideElevatorInterval怎么用?Python ElevatorUtils.getRideElevatorInterval使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.building.ElevatorUtils
的用法示例。
在下文中一共展示了ElevatorUtils.getRideElevatorInterval方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: enterElevator
# 需要导入模块: from toontown.building import ElevatorUtils [as 别名]
# 或者: from toontown.building.ElevatorUtils import getRideElevatorInterval [as 别名]
def enterElevator(self):
for toonId in self.involvedToons:
toon = self.cr.doId2do.get(toonId)
if toon:
toon.stopLookAround()
toon.stopSmooth()
self.placeToonInElevator(toon)
self.toMovieMode()
camera.reparentTo(self.elevatorModel)
camera.setPosHpr(0, 30, 8, 180, 0, 0)
base.playMusic(self.elevatorMusic, looping=1, volume=1.0)
ival = Sequence(ElevatorUtils.getRideElevatorInterval(self.elevatorType), ElevatorUtils.getRideElevatorInterval(self.elevatorType), self.openDoors, Func(camera.wrtReparentTo, render), Func(self.__doneElevator))
intervalName = 'ElevatorMovie'
ival.start()
self.storeInterval(ival, intervalName)
示例2: __playElevator
# 需要导入模块: from toontown.building import ElevatorUtils [as 别名]
# 或者: from toontown.building.ElevatorUtils import getRideElevatorInterval [as 别名]
#.........这里部分代码省略.........
self.cagePos = []
for height in self.cageHeights:
self.cagePos.append(Point3(pos[0], pos[1], height))
self.cageDoor = self.floorModel.find('**/cage_door')
self.cageDoor.wrtReparentTo(self.cage)
if self.FOType:
paintingModelName = PAINTING_DICT.get(self.FOType)
for i in xrange(4):
paintingModel = loader.loadModel('phase_5/models/cogdominium/%s' % paintingModelName)
loc = self.floorModel.find('**/loc_painting%d' % (i + 1))
paintingModel.reparentTo(loc)
if not self.floorModel.find('**/trophyCase').isEmpty():
for i in xrange(4):
goldEmblem = loader.loadModel('phase_5/models/cogdominium/tt_m_ara_crg_goldTrophy.bam')
loc = self.floorModel.find('**/gold_0%d' % (i + 1))
goldEmblem.reparentTo(loc)
for i in xrange(20):
silverEmblem = loader.loadModel('phase_5/models/cogdominium/tt_m_ara_crg_silverTrophy.bam')
loc = self.floorModel.find('**/silver_0%d' % (i + 1))
silverEmblem.reparentTo(loc)
SuitHs = self.BossOffice_SuitHs
SuitPositions = self.BossOffice_SuitPositions
self.__makeShopOwnerNpc()
else:
if self._wantBarrelRoom:
self.barrelRoom.load()
self.barrelRoom.hide()
SuitHs = self.Cubicle_SuitHs
SuitPositions = self.Cubicle_SuitPositions
if self.floorModel:
self.floorModel.reparentTo(render)
if self.isBossFloor(self.currentFloor):
self.notify.info('Load boss_suit_office')
elevIn = self.floorModel.find(CogdoGameConsts.PenthouseElevatorInPath).copyTo(render)
elevOut = self.floorModel.find(CogdoGameConsts.PenthouseElevatorOutPath)
frame = self.elevatorModelOut.find('**/frame')
if not frame.isEmpty():
frame.hide()
frame = self.elevatorModelIn.find('**/frame')
if not frame.isEmpty():
frame.hide()
self.elevatorModelOut.reparentTo(elevOut)
self.elevatorModelOut.setY(0)
else:
elevIn = self.floorModel.find('**/elevator-in')
elevOut = self.floorModel.find('**/elevator-out')
elif self._wantBarrelRoom and self.barrelRoom.isLoaded() and self.currentFloor == 2 and self.FOType == 'l': #i know this is really ugly
elevIn = self.barrelRoom.model.find(CogdoBarrelRoomConsts.BarrelRoomElevatorInPath)
elevOut = self.barrelRoom.model.find(CogdoBarrelRoomConsts.BarrelRoomElevatorOutPath)
y = elevOut.getY(render)
elevOut = elevOut.copyTo(render)
elevOut.setY(render, y - 0.75)
else:
floorModel = loader.loadModel('phase_7/models/modules/boss_suit_office')
elevIn = floorModel.find('**/elevator-in').copyTo(render)
elevOut = floorModel.find('**/elevator-out').copyTo(render)
floorModel.removeNode()
self.elevIn = elevIn
self.elevOut = elevOut
self._haveEntranceElevator.set(True)
for index in xrange(len(self.suits)):
if not self.suits[index].isEmpty():
self.suits[index].setPos(SuitPositions[index])
if len(self.suits) > 2:
self.suits[index].setH(SuitHs[index])
else:
self.suits[index].setH(170)
self.suits[index].loop('neutral')
for toon in self.toons:
toon.reparentTo(self.elevatorModelIn)
index = self.toonIds.index(toon.doId)
toon.setPos(ElevatorPoints[index][0], ElevatorPoints[index][1], ElevatorPoints[index][2])
toon.setHpr(180, 0, 0)
toon.loop('neutral')
self.elevatorModelIn.reparentTo(elevIn)
self.leftDoorIn.setPos(3.5, 0, 0)
self.rightDoorIn.setPos(-3.5, 0, 0)
camera.reparentTo(self.elevatorModelIn)
camera.setH(180)
camera.setP(0)
camera.setPos(0, 14, 4)
base.playMusic(self.elevatorMusic, looping=1, volume=0.8)
track = Sequence(Func(base.transitions.noTransitions), ElevatorUtils.getRideElevatorInterval(ELEVATOR_NORMAL), ElevatorUtils.getOpenInterval(self, self.leftDoorIn, self.rightDoorIn, self.openSfx, None, type=ELEVATOR_NORMAL), Func(camera.wrtReparentTo, render))
for toon in self.toons:
track.append(Func(toon.wrtReparentTo, render))
track.append(Func(callback))
track.start(ts)
self.activeIntervals[name] = track
示例3: __playElevator
# 需要导入模块: from toontown.building import ElevatorUtils [as 别名]
# 或者: from toontown.building.ElevatorUtils import getRideElevatorInterval [as 别名]
def __playElevator(self, ts, name, callback):
SuitHs = []
SuitPositions = []
if self.floorModel:
self.floorModel.removeNode()
self.floorModel = None
if self.cage:
self.cage = None
if self.currentFloor == 0:
SuitHs = self.BottomFloor_SuitHs
SuitPositions = self.BottomFloor_SuitPositions
if self.isBossFloor(self.currentFloor):
self.barrelRoom.unload()
self.floorModel = loader.loadModel("phase_5/models/cogdominium/tt_m_ara_crg_penthouse")
self.cage = self.floorModel.find("**/cage")
pos = self.cage.getPos()
self.cagePos = []
for height in self.cageHeights:
self.cagePos.append(Point3(pos[0], pos[1], height))
self.cageDoor = self.floorModel.find("**/cage_door")
self.cageDoor.wrtReparentTo(self.cage)
if self.FOType:
paintingModelName = PAINTING_DICT.get(self.FOType)
for i in range(4):
paintingModel = loader.loadModel("phase_5/models/cogdominium/%s" % paintingModelName)
loc = self.floorModel.find("**/loc_painting%d" % (i + 1))
paintingModel.reparentTo(loc)
SuitHs = self.BossOffice_SuitHs
SuitPositions = self.BossOffice_SuitPositions
self.__makeShopOwnerNpc()
else:
if self._wantBarrelRoom:
self.barrelRoom.load()
self.barrelRoom.hide()
SuitHs = self.Cubicle_SuitHs
SuitPositions = self.Cubicle_SuitPositions
if self.floorModel:
self.floorModel.reparentTo(render)
if self.isBossFloor(self.currentFloor):
self.notify.debug("Load boss_suit_office")
elevIn = self.floorModel.find(CogdoGameConsts.PenthouseElevatorInPath).copyTo(render)
elevOut = self.floorModel.find(CogdoGameConsts.PenthouseElevatorOutPath)
frame = self.elevatorModelOut.find("**/frame")
if not frame.isEmpty():
frame.hide()
frame = self.elevatorModelIn.find("**/frame")
if not frame.isEmpty():
frame.hide()
self.elevatorModelOut.reparentTo(elevOut)
else:
elevIn = self.floorModel.find("**/elevator-in")
elevOut = self.floorModel.find("**/elevator-out")
elif self._wantBarrelRoom and self.barrelRoom.isLoaded():
elevIn = self.barrelRoom.dummyElevInNode
elevOut = self.barrelRoom.model.find(CogdoBarrelRoomConsts.BarrelRoomElevatorOutPath)
y = elevOut.getY(render)
elevOut = elevOut.copyTo(render)
elevOut.setY(render, y - 0.75)
else:
floorModel = loader.loadModel("phase_7/models/modules/boss_suit_office")
elevIn = floorModel.find("**/elevator-in").copyTo(render)
elevOut = floorModel.find("**/elevator-out").copyTo(render)
floorModel.removeNode()
self.elevIn = elevIn
self.elevOut = elevOut
self._haveEntranceElevator.set(True)
for index in range(len(self.suits)):
self.suits[index].setPos(SuitPositions[index])
if len(self.suits) > 2:
self.suits[index].setH(SuitHs[index])
else:
self.suits[index].setH(170)
self.suits[index].loop("neutral")
for toon in self.toons:
toon.reparentTo(self.elevatorModelIn)
index = self.toonIds.index(toon.doId)
toon.setPos(ElevatorPoints[index][0], ElevatorPoints[index][1], ElevatorPoints[index][2])
toon.setHpr(180, 0, 0)
toon.loop("neutral")
self.elevatorModelIn.reparentTo(elevIn)
self.leftDoorIn.setPos(3.5, 0, 0)
self.rightDoorIn.setPos(-3.5, 0, 0)
camera.reparentTo(self.elevatorModelIn)
camera.setH(180)
camera.setP(0)
camera.setPos(0, 14, 4)
base.playMusic(self.elevatorMusic, looping=1, volume=0.8)
track = Sequence(
Func(base.transitions.noTransitions),
ElevatorUtils.getRideElevatorInterval(ELEVATOR_NORMAL),
ElevatorUtils.getOpenInterval(
self, self.leftDoorIn, self.rightDoorIn, self.openSfx, None, type=ELEVATOR_NORMAL
),
Func(camera.wrtReparentTo, render),
)
for toon in self.toons:
#.........这里部分代码省略.........