当前位置: 首页>>代码示例>>Python>>正文


Python MovieCamera.chooseRewardShot方法代码示例

本文整理汇总了Python中MovieCamera.chooseRewardShot方法的典型用法代码示例。如果您正苦于以下问题:Python MovieCamera.chooseRewardShot方法的具体用法?Python MovieCamera.chooseRewardShot怎么用?Python MovieCamera.chooseRewardShot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MovieCamera的用法示例。


在下文中一共展示了MovieCamera.chooseRewardShot方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: doToonVictory

# 需要导入模块: import MovieCamera [as 别名]
# 或者: from MovieCamera import chooseRewardShot [as 别名]
def doToonVictory(localToonActive, toons, rewardDicts, deathList, rpanel):
    tracks = []
    if localToonActive == 1:
        tracks.append(Func(rpanel.show))
        tracks.append(Func(NametagGlobals.setOnscreenChatForced, 1))
    
    camTracks = []
    endTracks = []
    danceSound = globalBattleSoundCache.getSound('ENC_Win.mp3')
    for t in toons:
        rdict = __findToonReward(rewardDicts, t)
        expTrack = rpanel.getExpTrack(t, rdict['origExp'], rdict['earnedExp'], deathList, rdict['items'], rdict['missedItems'], toons)
        if expTrack:
            tracks.append(expTrack)
            camDuration = expTrack.getDuration()
            camExpTrack = MovieCamera.chooseRewardShot(t, camDuration)
            camTracks.append(MovieCamera.chooseRewardShot(t, camDuration))
        
    
    if localToonActive == 1:
        tracks.append(Func(rpanel.hide))
        tracks.append(Func(NametagGlobals.setOnscreenChatForced, 0))
    
    tracks = tracks + endTracks
    seq = Sequence(tracks)
    seqdur = seq.getDuration()
    print 'dance duration: ', seqdur
    soundTrack = SoundInterval(danceSound, duration = seqdur, loop = 1)
    mtrack = Parallel(Sequence(tracks), soundTrack)
    camTrack = Track(camTracks)
    return (mtrack, camTrack)
开发者ID:Toonerz,项目名称:Toontown-2003,代码行数:33,代码来源:MovieToonVictory.py

示例2: doToonVictory

# 需要导入模块: import MovieCamera [as 别名]
# 或者: from MovieCamera import chooseRewardShot [as 别名]
def doToonVictory(localToonActive, toons, rewardToonIds, rewardDicts, deathList, rpanel, allowGroupShot = 1, uberList = [], helpfulToonsList = [], noSkip = False):
    track = Sequence()
    if localToonActive == 1:
        track.append(Func(rpanel.show))
        track.append(Func(NametagGlobals.setOnscreenChatForced, 1))
    camTrack = Sequence()
    endTrack = Sequence()
    danceSound = globalBattleSoundCache.getSound('ENC_Win.ogg')
    toonList = []
    countToons = 0
    uberListNew = []
    for t in toons:
        if isinstance(t, types.IntType):
            t = base.cr.doId2do.get(t)
        if t:
            toonList.append(t)
            uberListNew.append(uberList[countToons])
        countToons += 1

    toonId2toon = {}
    for toon in toonList:
        toonId2toon[toon.doId] = toon

    rewardToonList = []
    for id in rewardToonIds:
        rewardToonList.append(toonId2toon.get(id))

    skipper = ToonVictorySkipper(len(toonList), noSkip)
    lastListenIndex = 0
    track.append(skipper.getSetupFunc(lastListenIndex))
    for tIndex in xrange(len(toonList)):
        t = toonList[tIndex]
        rdict = __findToonReward(rewardDicts, t)
        if rdict != None:
            expTrack = rpanel.getExpTrack(t, rdict['origExp'], rdict['earnedExp'], deathList, rdict['origQuests'], rdict['items'], rdict['missedItems'], rdict['origMerits'], rdict['merits'], rdict['parts'], rewardToonList, uberListNew[tIndex], helpfulToonsList, noSkip=noSkip)
            if expTrack:
                skipper.setStartTime(tIndex, track.getDuration())
                track.append(skipper.getTeardownFunc(lastListenIndex))
                lastListenIndex = tIndex
                track.append(skipper.getSetupFunc(lastListenIndex))
                track.append(expTrack)
                camDuration = expTrack.getDuration()
                camExpTrack = MovieCamera.chooseRewardShot(t, camDuration)
                camTrack.append(MovieCamera.chooseRewardShot(t, camDuration, allowGroupShot=allowGroupShot))

    track.append(skipper.getTeardownFunc(lastListenIndex))
    track.append(Func(skipper.destroy))
    if localToonActive == 1:
        track.append(Func(rpanel.hide))
        track.append(Func(NametagGlobals.setOnscreenChatForced, 0))
    track.append(endTrack)
    trackdur = track.getDuration()
    soundTrack = SoundInterval(danceSound, duration=trackdur, loop=1)
    mtrack = Parallel(track, soundTrack)
    skipper.setIvals((mtrack, camTrack))
    return (mtrack, camTrack, skipper)
开发者ID:Keithybub,项目名称:ToonTownReviveOld,代码行数:58,代码来源:MovieToonVictory.py


注:本文中的MovieCamera.chooseRewardShot方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。