Ejemplo n.º 1
0
    def enterReward(self):
        self.cleanupIntervals()
        self.clearChat()
        self.resistanceToon.clearChat()
        self.stash()
        self.stopAnimate()
        self.controlToons()
        panelName = self.uniqueName('reward')
        self.rewardPanel = RewardPanel.RewardPanel(panelName)
        victory, camVictory, skipper = MovieToonVictory.doToonVictory(
            1,
            self.involvedToons,
            self.toonRewardIds,
            self.toonRewardDicts,
            self.deathList,
            self.rewardPanel,
            allowGroupShot=0,
            uberList=self.uberList,
            noSkip=True)
        ival = Sequence(Parallel(victory, camVictory), Func(self.__doneReward))
        intervalName = 'RewardMovie'
        delayDeletes = []
        for toonId in self.involvedToons:
            toon = self.cr.doId2do.get(toonId)
            if toon:
                delayDeletes.append(
                    DelayDelete.DelayDelete(toon, 'CashbotBoss.enterReward'))

        ival.delayDeletes = delayDeletes
        ival.start()
        self.storeInterval(ival, intervalName)
        if self.oldState != 'Victory':
            base.playMusic(self.battleThreeMusic, looping=1, volume=0.9)
Ejemplo n.º 2
0
 def playTutorialReward(self, ts, name, callback):
     self.rewardHasBeenReset = 0
     self.rewardPanel = RewardPanel.RewardPanel(name)
     self.rewardCallback = callback
     self.questList = self.rewardPanel.getQuestIntervalList(
         base.localAvatar, [0, 1, 1, 0], [base.localAvatar],
         base.localAvatar.quests[0], [], [base.localAvatar.getDoId()])
     camera.setPosHpr(0, 8, base.localAvatar.getHeight() * 0.66, 179, 15, 0)
     self.playTutorialReward_1()
Ejemplo n.º 3
0
    def playReward(self, ts, name, callback, noSkip=False):
        self.rewardHasBeenReset = 0
        ptrack = Sequence()
        camtrack = Sequence()
        self.rewardPanel = RewardPanel.RewardPanel(name)
        self.rewardPanel.hide()
        victory, camVictory, skipper = MovieToonVictory.doToonVictory(
            self.battle.localToonActive(),
            self.battle.activeToons,
            self.toonRewardIds,
            self.toonRewardDicts,
            self.deathList,
            self.rewardPanel,
            1,
            self.uberList,
            self.helpfulToonsList,
            noSkip=noSkip)
        if victory:
            skipper.setIvals((ptrack, camtrack), ptrack.getDuration())
            ptrack.append(victory)
            camtrack.append(camVictory)
        ptrack.append(Func(callback))
        self._deleteTrack()
        self.track = Sequence(ptrack,
                              name='movie-reward-track-%d' % self.battle.doId)
        if self.battle.localToonActive():
            self.track = Parallel(self.track,
                                  camtrack,
                                  name='movie-reward-track-with-cam-%d' %
                                  self.battle.doId)
        self.track.delayDeletes = []
        for t in self.battle.activeToons:
            self.track.delayDeletes.append(
                DelayDelete.DelayDelete(t, 'Movie.playReward'))

        skipper.setIvals((self.track, ), 0.0)
        skipper.setBattle(self.battle)
        self.track.start(ts)