Exemplo n.º 1
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)
        return None
Exemplo n.º 2
0
    def playReward(self, ts, name, callback):
        self.rewardHasBeenReset = 0
        ptrack = Sequence()
        camtrack = Sequence()
        self.rewardPanel = RewardPanel.RewardPanel(name)
        self.rewardPanel.hide()

        (victory, camVictory) = MovieToonVictory.doToonVictory(
                                self.battle.localToonActive(),
                                self.battle.activeToons,
                                self.toonRewardIds,
                                self.toonRewardDicts,
                                self.deathList,
                                self.rewardPanel,
                                1,
                                self.uberList,
                                self.helpfulToonsList)
        if (victory):
            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'))
        self.track.start(ts)
        return None
Exemplo n.º 3
0
    def playReward(self, ts, name, callback, noSkip=False):
        self.rewardHasBeenReset = 0
        ptrack = Sequence()
        camtrack = Sequence()
        print 'heya'
        self.rewardPanel = RewardPanel.RewardPanel(name)
        print 'heya'
        self.rewardPanel.hide()
        print 'heya'
        try:
            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)
        except:
            raise
        print 'heya'
        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'))

        print 'heya'
        skipper.setIvals((self.track, ), 0.0)
        print 'heya'
        skipper.setBattle(self.battle)
        self.track.start(ts)
        return None
Exemplo n.º 4
0
    def playReward(self, ts, name, callback):
        self.rewardHasBeenReset = 0
        plist = []
        camlist = []
        self.rewardPanel = RewardPanel.RewardPanel(name)
        self.rewardPanel.hide()
        victory, camVictory = MovieToonVictory.doToonVictory(self.battle.localToonActive(), self.battle.activeToons, self.toonRewardDicts, self.deathList, self.rewardPanel)
        if victory:
            plist.append(victory)
            camlist.append(camVictory)
        plist.append(FunctionInterval(callback))
        self.track = Sequence(plist, name='movie-reward-track-%d' % self.battle.doId)
        if self.battle.localToonActive():
            self.track = Parallel(self.track, Sequence(camlist), 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))

        self.track.start(ts)
        return None
        return
Exemplo n.º 5
0
 def playReward(self, ts, name, callback):
     self.rewardHasBeenReset = 0
     plist = []
     camlist = []
     self.rewardPanel = RewardPanel.RewardPanel(name)
     self.rewardPanel.hide()
     (victory, camVictory) = MovieToonVictory.doToonVictory(self.battle.localToonActive(), self.battle.activeToons, self.toonRewardDicts, self.deathList, self.rewardPanel)
     if victory:
         plist.append(victory)
         camlist.append(camVictory)
     
     plist.append(FunctionInterval(callback))
     self.track = Sequence(plist, name = 'movie-reward-track-%d' % self.battle.doId)
     if self.battle.localToonActive():
         self.track = Parallel(self.track, Sequence(camlist), 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))
     
     self.track.start(ts)
     return None