def createRewardMovie(self, localAvId):
    retval = Sequence(name='Reward sequence', autoPause=1)
    self.trophy = None

    def setTrophyLabelText(text, playerIndex, trophyIndex):
        self.rankLabel.hide()
        self.rewardLabel.hide()
        self.trophy = GolfTrophy(level=self.trophyList[playerIndex][trophyIndex], parent=self.trophyLabel, pos=(1.3, 0, (- 0.25)))
        self.trophy.setScale(0.65, 1, 0.65)
        self.trophy.show()
        self.trophyLabel['text'] = text

    def setRewardLabelText(text):
        self.rewardLabel.show()
        self.rankLabel.hide()
        self.trophyLabel.hide()
        if self.trophy:
            self.trophy.hide()
        self.rewardLabel['text'] = text

    def setRankLabelText(text):
        self.rankLabel.show()
        self.rewardLabel.hide()
        self.trophyLabel.hide()
        if self.trophy:
            self.trophy.hide()
        self.rankLabel['text'] = text
        if (len(self.avIdList) > 1):
            self.victory = base.loader.loadSfx(('phase_6/audio/sfx/KART_Applause_%d.ogg' % self.myPlace))
            self.victory.play()
    for avId in self.avIdList:
        if (avId != localAvId):
            rewardTextList = self.calcTrophyTextListForOnePlayer(avId)
            trophyIndex = 0
            for rewardText in rewardTextList:
                playerIndex = self.avIdList.index(avId)
                var = (rewardText, playerIndex, trophyIndex)
                oneTrophyIval = Parallel(Func(setTrophyLabelText, rewardText, playerIndex, trophyIndex), LerpColorScaleInterval(self.trophyLabel, 4, Vec4(1, 1, 1, 0), startColorScale=Vec4(1, 1, 1, 1), blendType='easeIn'))
                trophyIndex = (trophyIndex + 1)
                retval.append(oneTrophyIval)
    rewardTextList = self.calcTrophyTextListForOnePlayer(localAvId)
    trophyIndex = 0
    playerIndex = self.avIdList.index(localAvId)
    for rewardText in rewardTextList:
        if (len(rewardTextList) > 0):
            var = (rewardText, playerIndex, trophyIndex)
            oneRewardIval = Parallel(Func(setTrophyLabelText, rewardText, playerIndex, trophyIndex), LerpColorScaleInterval(self.trophyLabel, 4, Vec4(1, 1, 1, 0), startColorScale=Vec4(1, 1, 1, 1), blendType='easeIn'))
            retval.append(oneRewardIval)
    rewardCupList = self.calcCupTextListForAllPlayers(localAvId)
    if (len(rewardCupList) > 0):
        for rewardText in rewardCupList:
            oneCupIval = Parallel(Func(setRewardLabelText, rewardText), LerpColorScaleInterval(self.rewardLabel, 4, Vec4(1, 1, 1, 0), startColorScale=Vec4(1, 1, 1, 1), blendType='noBlend'))
            retval.append(oneCupIval)
    if self.tieBreakWinner:
        name = ''
        av = base.cr.doId2do.get(self.tieBreakWinner)
        if av:
            name = av.getName()
            if GolfGlobals.TIME_TIE_BREAKER:
                rewardText = (TTLocalizer.GolfTimeTieBreakWinner % {'name': name})
            else:
                rewardText = (TTLocalizer.GolfTieBreakWinner % {'name': name})
            randomWinnerIval = Parallel(Func(setRewardLabelText, rewardText), LerpColorScaleInterval(self.rewardLabel, 7, Vec4(1, 1, 1, 0), startColorScale=Vec4(1, 1, 1, 1), blendType='noBlend'))
            retval.append(randomWinnerIval)
    rankings = self.calcRankings(localAvId)
    rankText = (TTLocalizer.GolfRanking + '\n')
    for rank in xrange(len(rankings)):
        rankText = ((rankText + rankings[rank]) + '\n')
    oneRankIval = Parallel(Func(setRankLabelText, rankText), LerpColorScaleInterval(self.rankLabel, 8, Vec4(1, 1, 1, 1), startColorScale=Vec4(1, 1, 1, 1), blendType='easeIn'))
    retval.append(oneRankIval)
    rewardHoleList = self.calcHoleBestTextListForAllPlayers(localAvId)
    if (len(rewardHoleList) > 0):
        for rewardText in rewardHoleList:
            oneHoleIval = Parallel(Func(setRewardLabelText, rewardText), LerpColorScaleInterval(self.rewardLabel, 8, Vec4(1, 1, 1, 0), startColorScale=Vec4(1, 1, 1, 1), blendType='easeIn'))
            retval.append(oneHoleIval)
    rewardCourseList = self.calcCourseBestTextListForAllPlayers(localAvId)
    if (len(rewardCourseList) > 0):
        for rewardText in rewardCourseList:
            oneCourseIval = Parallel(Func(setRewardLabelText, rewardText), LerpColorScaleInterval(self.rewardLabel, 4, Vec4(1, 1, 1, 0), startColorScale=Vec4(1, 1, 1, 1), blendType='easeIn'))
            retval.append(oneCourseIval)
    if self.endMovieCallback:
        retval.append(Func(self.endMovieCallback))
    return retval
def createRewardMovie(self, localAvId):
    retval = Sequence(name='Reward sequence', autoPause=1)
    self.trophy = None

    def setTrophyLabelText(text, playerIndex, trophyIndex):
        self.rankLabel.hide()
        self.rewardLabel.hide()
        self.trophy = GolfTrophy(level=self.trophyList[playerIndex][trophyIndex], parent=self.trophyLabel, pos=(1.3, 0, (- 0.25)))
        self.trophy.setScale(0.65, 1, 0.65)
        self.trophy.show()
        self.trophyLabel['text'] = text

    def setRewardLabelText(text):
        self.rewardLabel.show()
        self.rankLabel.hide()
        self.trophyLabel.hide()
        if self.trophy:
            self.trophy.hide()
        self.rewardLabel['text'] = text

    def setRankLabelText(text):
        self.rankLabel.show()
        self.rewardLabel.hide()
        self.trophyLabel.hide()
        if self.trophy:
            self.trophy.hide()
        self.rankLabel['text'] = text
        if (len(self.avIdList) > 1):
            self.victory = base.loader.loadSfx(('phase_6/audio/sfx/KART_Applause_%d.ogg' % self.myPlace))
            self.victory.play()
    for avId in self.avIdList:
        if (avId != localAvId):
            rewardTextList = self.calcTrophyTextListForOnePlayer(avId)
            trophyIndex = 0
            for rewardText in rewardTextList:
                playerIndex = self.avIdList.index(avId)
                var = (rewardText, playerIndex, trophyIndex)
                oneTrophyIval = Parallel(Func(setTrophyLabelText, rewardText, playerIndex, trophyIndex), LerpColorScaleInterval(self.trophyLabel, 4, Vec4(1, 1, 1, 0), startColorScale=Vec4(1, 1, 1, 1), blendType='easeIn'))
                trophyIndex = (trophyIndex + 1)
                retval.append(oneTrophyIval)
    rewardTextList = self.calcTrophyTextListForOnePlayer(localAvId)
    trophyIndex = 0
    playerIndex = self.avIdList.index(localAvId)
    for rewardText in rewardTextList:
        if (len(rewardTextList) > 0):
            var = (rewardText, playerIndex, trophyIndex)
            oneRewardIval = Parallel(Func(setTrophyLabelText, rewardText, playerIndex, trophyIndex), LerpColorScaleInterval(self.trophyLabel, 4, Vec4(1, 1, 1, 0), startColorScale=Vec4(1, 1, 1, 1), blendType='easeIn'))
            retval.append(oneRewardIval)
    rewardCupList = self.calcCupTextListForAllPlayers(localAvId)
    if (len(rewardCupList) > 0):
        for rewardText in rewardCupList:
            oneCupIval = Parallel(Func(setRewardLabelText, rewardText), LerpColorScaleInterval(self.rewardLabel, 4, Vec4(1, 1, 1, 0), startColorScale=Vec4(1, 1, 1, 1), blendType='noBlend'))
            retval.append(oneCupIval)
    if self.tieBreakWinner:
        name = 
        av = base.cr.doId2do.get(self.tieBreakWinner)
        if av:
            name = av.getName()
            if GolfGlobals.TIME_TIE_BREAKER:
                rewardText = (TTLocalizer.GolfTimeTieBreakWinner % {'name': name})
            else:
                rewardText = (TTLocalizer.GolfTieBreakWinner % {'name': name})
            randomWinnerIval = Parallel(Func(setRewardLabelText, rewardText), LerpColorScaleInterval(self.rewardLabel, 7, Vec4(1, 1, 1, 0), startColorScale=Vec4(1, 1, 1, 1), blendType='noBlend'))
            retval.append(randomWinnerIval)
    rankings = self.calcRankings(localAvId)
    rankText = (TTLocalizer.GolfRanking + '\n')
    for rank in xrange(len(rankings)):
        rankText = ((rankText + rankings[rank]) + '\n')
    oneRankIval = Parallel(Func(setRankLabelText, rankText), LerpColorScaleInterval(self.rankLabel, 8, Vec4(1, 1, 1, 1), startColorScale=Vec4(1, 1, 1, 1), blendType='easeIn'))
    retval.append(oneRankIval)
    rewardHoleList = self.calcHoleBestTextListForAllPlayers(localAvId)
    if (len(rewardHoleList) > 0):
        for rewardText in rewardHoleList:
            oneHoleIval = Parallel(Func(setRewardLabelText, rewardText), LerpColorScaleInterval(self.rewardLabel, 8, Vec4(1, 1, 1, 0), startColorScale=Vec4(1, 1, 1, 1), blendType='easeIn'))
            retval.append(oneHoleIval)
    rewardCourseList = self.calcCourseBestTextListForAllPlayers(localAvId)
    if (len(rewardCourseList) > 0):
        for rewardText in rewardCourseList:
            oneCourseIval = Parallel(Func(setRewardLabelText, rewardText), LerpColorScaleInterval(self.rewardLabel, 4, Vec4(1, 1, 1, 0), startColorScale=Vec4(1, 1, 1, 1), blendType='easeIn'))
            retval.append(oneCourseIval)
    if self.endMovieCallback:
        retval.append(Func(self.endMovieCallback))
    return retval