コード例 #1
0
    def __playReservesJoining(self, ts, name, callback):
        index = 0
        for suit in self.joiningReserves:
            suit.reparentTo(render)
            suit.setPos(
                self.elevatorModelOut,
                Point3(ElevatorPoints[index][0], ElevatorPoints[index][1],
                       ElevatorPoints[index][2]))
            index += 1
            suit.setH(180)
            suit.loop('neutral')

        track = Sequence(
            Func(camera.wrtReparentTo, self.elevatorModelOut),
            Func(camera.setPos, Point3(0, -8, 2)),
            Func(camera.setHpr, Vec3(0, 10, 0)),
            Parallel(
                SoundInterval(self.openSfx),
                LerpPosInterval(
                    self.leftDoorOut,
                    ElevatorData[ELEVATOR_NORMAL]['closeTime'],
                    Point3(0, 0, 0),
                    startPos=ElevatorUtils.getLeftClosePoint(ELEVATOR_NORMAL),
                    blendType='easeOut'),
                LerpPosInterval(
                    self.rightDoorOut,
                    ElevatorData[ELEVATOR_NORMAL]['closeTime'],
                    Point3(0, 0, 0),
                    startPos=ElevatorUtils.getRightClosePoint(ELEVATOR_NORMAL),
                    blendType='easeOut')), Wait(SUIT_HOLD_ELEVATOR_TIME),
            Func(camera.wrtReparentTo, render), Func(callback))
        track.start(ts)
        self.activeIntervals[name] = track
コード例 #2
0
    def __playReservesJoining(self, ts, name, callback):
        # Position the joining suits
        index = 0
        assert(len(self.joiningReserves) <= 4)
        for suit in self.joiningReserves:
            suit.reparentTo(render)
            suit.setPos(self.elevatorModelOut, Point3(ElevatorPoints[index][0],
                                                      ElevatorPoints[index][1],
                                                      ElevatorPoints[index][2]))
            index += 1
            suit.setH(180)
            suit.loop('neutral')

        # Aim the camera at the far elevator
        track = Sequence(
            Func(camera.wrtReparentTo, self.elevatorModelOut),
            Func(camera.setPos, Point3(0, -8, 2)),
            Func(camera.setHpr, Vec3(0, 10, 0)),

            # Open the elevator doors
            Parallel(SoundInterval(self.openSfx),
                     LerpPosInterval(self.leftDoorOut, 
                                     ElevatorData[ELEVATOR_NORMAL]['closeTime'],
                                     Point3(0, 0, 0), 
                                     startPos=ElevatorUtils.getLeftClosePoint(ELEVATOR_NORMAL),
                                     blendType='easeOut'),
                     LerpPosInterval(self.rightDoorOut,
                                     ElevatorData[ELEVATOR_NORMAL]['closeTime'],
                                     Point3(0, 0, 0), 
                                     startPos=ElevatorUtils.getRightClosePoint(ELEVATOR_NORMAL),
                                     blendType='easeOut'),
                     ),

            # Hold the camera angle for a couple of beats
            Wait(SUIT_HOLD_ELEVATOR_TIME),

            # Reparent the camera to render (enterWaitForInput will
            # position it properly again by the battle)
            Func(camera.wrtReparentTo, render),
            Func(callback),
            )
        track.start(ts)
        self.activeIntervals[name] = track
コード例 #3
0
 def __playCloseElevatorOut(self, name):
     # Close the elevator doors
     track = Sequence(
         Wait(SUIT_LEAVE_ELEVATOR_TIME),
         Parallel(SoundInterval(self.closeSfx),
                  LerpPosInterval(self.leftDoorOut, 
                                  ElevatorData[ELEVATOR_NORMAL]['closeTime'],
                                  ElevatorUtils.getLeftClosePoint(ELEVATOR_NORMAL),
                                  startPos=Point3(0, 0, 0), 
                                  blendType='easeOut'),
                  LerpPosInterval(self.rightDoorOut,
                                  ElevatorData[ELEVATOR_NORMAL]['closeTime'],
                                  ElevatorUtils.getRightClosePoint(ELEVATOR_NORMAL),
                                  startPos=Point3(0, 0, 0),
                                  blendType='easeOut')
                  ),
         )
     track.start()
     self.activeIntervals[name] = track
コード例 #4
0
 def __playCloseElevatorOut(self, name):
     track = Sequence(
         Wait(SUIT_LEAVE_ELEVATOR_TIME),
         Parallel(
             SoundInterval(self.closeSfx),
             LerpPosInterval(
                 self.leftDoorOut,
                 ElevatorData[ELEVATOR_NORMAL]['closeTime'],
                 ElevatorUtils.getLeftClosePoint(ELEVATOR_NORMAL),
                 startPos=Point3(0, 0, 0),
                 blendType='easeOut'),
             LerpPosInterval(
                 self.rightDoorOut,
                 ElevatorData[ELEVATOR_NORMAL]['closeTime'],
                 ElevatorUtils.getRightClosePoint(ELEVATOR_NORMAL),
                 startPos=Point3(0, 0, 0),
                 blendType='easeOut')))
     track.start()
     self.activeIntervals[name] = track
コード例 #5
0
    def __playReservesJoining(self, ts, name, callback):
        index = 0
        for suit in self.joiningReserves:
            suit.reparentTo(render)
            suit.setPos(
                self.elevatorModelOut,
                Point3(ElevatorPoints[index][0], ElevatorPoints[index][1], ElevatorPoints[index][2]),
            )
            index += 1
            suit.setH(180)
            suit.loop("neutral")

        track = Sequence(
            Func(camera.wrtReparentTo, self.elevatorModelOut),
            Func(camera.setPos, Point3(0, -8, 2)),
            Func(camera.setHpr, Vec3(0, 10, 0)),
            Parallel(
                SoundInterval(self.openSfx),
                LerpPosInterval(
                    self.leftDoorOut,
                    ElevatorData[ELEVATOR_NORMAL]["closeTime"],
                    Point3(0, 0, 0),
                    startPos=ElevatorUtils.getLeftClosePoint(ELEVATOR_NORMAL),
                    blendType="easeOut",
                ),
                LerpPosInterval(
                    self.rightDoorOut,
                    ElevatorData[ELEVATOR_NORMAL]["closeTime"],
                    Point3(0, 0, 0),
                    startPos=ElevatorUtils.getRightClosePoint(ELEVATOR_NORMAL),
                    blendType="easeOut",
                ),
            ),
            Wait(SUIT_HOLD_ELEVATOR_TIME),
            Func(camera.wrtReparentTo, render),
            Func(callback),
        )
        track.start(ts)
        self.activeIntervals[name] = track