本文整理汇总了Python中toontown.building.ElevatorUtils.closeDoors方法的典型用法代码示例。如果您正苦于以下问题:Python ElevatorUtils.closeDoors方法的具体用法?Python ElevatorUtils.closeDoors怎么用?Python ElevatorUtils.closeDoors使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.building.ElevatorUtils
的用法示例。
在下文中一共展示了ElevatorUtils.closeDoors方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: close
# 需要导入模块: from toontown.building import ElevatorUtils [as 别名]
# 或者: from toontown.building.ElevatorUtils import closeDoors [as 别名]
def close(self, animate=True):
if not self._open:
return
if animate:
self._finishIval()
self._ival = Sequence(
Parallel(
SoundInterval(self._closeSfx),
self._leftDoor.posInterval(
self.getOpenCloseDuration(),
ElevatorUtils.getLeftClosePoint(ElevatorConstants.ELEVATOR_NORMAL),
startPos=ElevatorUtils.getLeftOpenPoint(ElevatorConstants.ELEVATOR_NORMAL),
blendType="easeIn",
),
self._rightDoor.posInterval(
self.getOpenCloseDuration(),
ElevatorUtils.getRightClosePoint(ElevatorConstants.ELEVATOR_NORMAL),
startPos=ElevatorUtils.getRightOpenPoint(ElevatorConstants.ELEVATOR_NORMAL),
blendType="easeIn",
),
)
)
self._ival.start()
else:
ElevatorUtils.closeDoors(self._leftDoor, self._rightDoor, type=ElevatorConstants.ELEVATOR_NORMAL)
self._open = False
示例2: exitIntroduction
# 需要导入模块: from toontown.building import ElevatorUtils [as 别名]
# 或者: from toontown.building.ElevatorUtils import closeDoors [as 别名]
def exitIntroduction(self):
self.notify.debug('DistributedBossCog.exitIntroduction:')
intervalName = 'IntroductionMovie'
self.clearInterval(intervalName)
self.unstickToons()
self.releaseToons()
NametagGlobals.setWant2dNametags(True)
ElevatorUtils.closeDoors(self.leftDoor, self.rightDoor, self.elevatorType)
示例3: exitElevator
# 需要导入模块: from toontown.building import ElevatorUtils [as 别名]
# 或者: from toontown.building.ElevatorUtils import closeDoors [as 别名]
def exitElevator(self):
intervalName = 'ElevatorMovie'
self.clearInterval(intervalName)
self.elevatorMusic.stop()
ElevatorUtils.closeDoors(
self.leftDoor,
self.rightDoor,
self.elevatorType)
示例4: loadEnvironment
# 需要导入模块: from toontown.building import ElevatorUtils [as 别名]
# 或者: from toontown.building.ElevatorUtils import closeDoors [as 别名]
def loadEnvironment(self):
DistributedBossCog.DistributedBossCog.loadEnvironment(self)
self.midVault = loader.loadModel('phase_10/models/cogHQ/MidVault')
self.endVault = loader.loadModel('phase_10/models/cogHQ/EndVault')
self.lightning = loader.loadModel('phase_10/models/cogHQ/CBLightning')
self.magnet = loader.loadModel('phase_10/models/cogHQ/CBMagnet')
self.craneArm = loader.loadModel('phase_10/models/cogHQ/CBCraneArm')
self.controls = loader.loadModel(
'phase_10/models/cogHQ/CBCraneControls')
self.stick = loader.loadModel('phase_10/models/cogHQ/CBCraneStick')
self.safe = loader.loadModel('phase_10/models/cogHQ/CBSafe')
self.eyes = loader.loadModel('phase_10/models/cogHQ/CashBotBossEyes')
self.cableTex = self.craneArm.findTexture('MagnetControl')
self.eyes.setPosHprScale(4.5, 0, -2.5, 90, 90, 0, 0.4, 0.4, 0.4)
self.eyes.reparentTo(self.neck)
self.eyes.hide()
self.midVault.setPos(0, -222, -70.7)
self.endVault.setPos(84, -201, -6)
self.geom = NodePath('geom')
self.midVault.reparentTo(self.geom)
self.endVault.reparentTo(self.geom)
self.endVault.findAllMatches('**/MagnetArms').detach()
self.endVault.findAllMatches('**/Safes').detach()
self.endVault.findAllMatches('**/MagnetControlsAll').detach()
cn = self.endVault.find('**/wallsCollision').node()
cn.setIntoCollideMask(OTPGlobals.WallBitmask |
ToontownGlobals.PieBitmask)
self.door1 = self.midVault.find('**/SlidingDoor1/')
self.door2 = self.midVault.find('**/SlidingDoor/')
self.door3 = self.endVault.find('**/SlidingDoor/')
elevatorModel = loader.loadModel('phase_10/models/cogHQ/CFOElevator')
elevatorOrigin = self.midVault.find('**/elevator_origin')
elevatorOrigin.setScale(1)
elevatorModel.reparentTo(elevatorOrigin)
leftDoor = elevatorModel.find('**/left_door')
leftDoor.setName('left-door')
rightDoor = elevatorModel.find('**/right_door')
rightDoor.setName('right-door')
self.setupElevator(elevatorOrigin)
ElevatorUtils.closeDoors(
leftDoor, rightDoor, ElevatorConstants.ELEVATOR_CFO)
walls = self.endVault.find('**/RollUpFrameCillison')
walls.detachNode()
self.evWalls = self.replaceCollisionPolysWithPlanes(walls)
self.evWalls.reparentTo(self.endVault)
self.evWalls.stash()
floor = self.endVault.find('**/EndVaultFloorCollision')
floor.detachNode()
self.evFloor = self.replaceCollisionPolysWithPlanes(floor)
self.evFloor.reparentTo(self.endVault)
self.evFloor.setName('floor')
plane = CollisionPlane(Plane(Vec3(0, 0, 1), Point3(0, 0, -50)))
planeNode = CollisionNode('dropPlane')
planeNode.addSolid(plane)
planeNode.setCollideMask(ToontownGlobals.PieBitmask)
self.geom.attachNewNode(planeNode)
self.geom.reparentTo(render)
示例5: exitPrepareBattleThree
# 需要导入模块: from toontown.building import ElevatorUtils [as 别名]
# 或者: from toontown.building.ElevatorUtils import closeDoors [as 别名]
def exitPrepareBattleThree(self):
intervalName = 'PrepareBattleThreeMovie'
self.clearInterval(intervalName)
self.unstickToons()
self.releaseToons()
if self.newState == 'BattleThree':
self.movieCrane.request('Free')
NametagGlobals.setWant2dNametags(True)
ElevatorUtils.closeDoors(self.leftDoor, self.rightDoor, ElevatorConstants.ELEVATOR_CFO)
taskMgr.remove(self.uniqueName('physics'))
示例6: exitPrepareBattleThree
# 需要导入模块: from toontown.building import ElevatorUtils [as 别名]
# 或者: from toontown.building.ElevatorUtils import closeDoors [as 别名]
def exitPrepareBattleThree(self):
intervalName = "PrepareBattleThreeMovie"
self.clearInterval(intervalName)
self.unstickToons()
self.releaseToons()
if self.newState == "BattleThree":
self.movieCrane.request("Free")
self.movieSafe.request("Initial")
NametagGlobals.setWant2dNametags(True)
ElevatorUtils.closeDoors(self.leftDoor, self.rightDoor, ElevatorConstants.ELEVATOR_CFO)
taskMgr.remove(self.uniqueName("physics"))