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


Python MovieCamera.toonGroupHighShot方法代码示例

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


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

示例1: __healDive

# 需要导入模块: import MovieCamera [as 别名]
# 或者: from MovieCamera import toonGroupHighShot [as 别名]
def __healDive(heal, hasInteractivePropHealBonus):
    splash = Splash.Splash(render)
    splash.reparentTo(render)
    npcId = 0
    if heal.has_key('npcId'):
        npcId = heal['npcId']
        toon = NPCToons.createLocalNPC(npcId)
        if toon == None:
            return None
        
    else:
        toon = heal['toon']
    targets = heal['target']
    ineffective = heal['sidestep']
    level = heal['level']
    if npcId != 0:
        track = Sequence(MovieNPCSOS.teleportIn(heal, toon))
    else:
        track = Sequence(__runToHealSpot(heal))
    delay = 7.0
    first = 1
    targetTrack = Sequence()
    for target in targets:
        targetToon = target['toon']
        hp = target['hp']
        reactIval = Func(__healToon, targetToon, hp, ineffective, hasInteractivePropHealBonus)
        if first == 1:
            targetTrack.append(Wait(delay))
            first = 0
        
        targetTrack.append(reactIval)
    
    thisBattle = heal['battle']
    toonsInBattle = thisBattle.toons
    glass = globalPropPool.getProp('glass')
    glass.setScale(4.0)
    glass.setHpr(0.0, 90.0, 0.0)
    ladder = globalPropPool.getProp('ladder')
    placeNode = NodePath('lookNode')
    diveProps = [
        glass,
        ladder]
    ladderScale = toon.getBodyScale() / 0.66000000000000003
    scaleUpPoint = Point3(0.5, 0.5, 0.45000000000000001) * ladderScale
    basePos = toon.getPos()
    glassOffset = Point3(0, 1.1000000000000001, 0.20000000000000001)
    glassToonOffset = Point3(0, 1.2, 0.20000000000000001)
    splashOffset = Point3(0, 1.0, 0.40000000000000002)
    ladderOffset = Point3(0, 4, 0)
    ladderToonSep = Point3(0, 1, 0) * ladderScale
    diveOffset = Point3(0, 0, 10)
    divePos = add3(add3(ladderOffset, diveOffset), ladderToonSep)
    ladder.setH(toon.getH())
    glassPos = render.getRelativePoint(toon, glassOffset)
    glassToonPos = render.getRelativePoint(toon, glassToonOffset)
    ladderPos = render.getRelativePoint(toon, ladderOffset)
    climbladderPos = render.getRelativePoint(toon, add3(ladderOffset, ladderToonSep))
    divePos = render.getRelativePoint(toon, divePos)
    topDivePos = render.getRelativePoint(toon, diveOffset)
    lookBase = render.getRelativePoint(toon, ladderOffset)
    lookTop = render.getRelativePoint(toon, add3(ladderOffset, diveOffset))
    LookGlass = render.getRelativePoint(toon, glassOffset)
    splash.setPos(splashOffset)
    walkToLadderTime = 1.0
    climbTime = 5.0
    diveTime = 1.0
    ladderGrowTime = 1.5
    splash.setPos(glassPos)
    toonNode = toon.getGeomNode()
    placeNode.reparentTo(render)
    placeNode.setScale(5.0)
    placeNode.setPos(toon.getPos(render))
    placeNode.setHpr(toon.getHpr(render))
    toonscale = toonNode.getScale()
    toonFacing = toon.getHpr()
    propTrack = Sequence(Func(MovieUtil.showProp, glass, render, glassPos), Func(MovieUtil.showProp, ladder, render, ladderPos), Func(toonsLook, toonsInBattle, placeNode, Point3(0, 0, 0)), Func(placeNode.setPos, lookBase), LerpScaleInterval(ladder, ladderGrowTime, scaleUpPoint, startScale = MovieUtil.PNT3_NEARZERO), Func(placeNode.setPos, lookTop), Wait(2.1000000000000001), MovieCamera.toonGroupHighShot(None, 0), Wait(2.1000000000000001), Func(placeNode.setPos, LookGlass), Wait(0.40000000000000002), MovieCamera.allGroupLowShot(None, 0), Wait(1.8), LerpScaleInterval(ladder, ladderGrowTime, MovieUtil.PNT3_NEARZERO, startScale = scaleUpPoint), Func(MovieUtil.removeProps, diveProps))
    mtrack = Parallel(propTrack, __getSoundTrack(level, 0.59999999999999998, duration = 9.0, node = toon), Sequence(Parallel(Sequence(ActorInterval(toon, 'walk', loop = 0, duration = walkToLadderTime), ActorInterval(toon, 'neutral', loop = 0, duration = 0.10000000000000001)), LerpPosInterval(toon, walkToLadderTime, climbladderPos), Wait(ladderGrowTime)), Parallel(ActorInterval(toon, 'climb', loop = 0, endFrame = 116), Sequence(Wait(4.5999999999999996), Func(toonNode.setTransparency, 1), LerpColorScaleInterval(toonNode, 0.25, VBase4(1, 1.0, 1, 0.0), blendType = 'easeInOut'), LerpScaleInterval(toonNode, 0.01, 0.10000000000000001, startScale = toonscale), LerpHprInterval(toon, 0.01, toonFacing), LerpPosInterval(toon, 0.0, glassToonPos), Func(toonNode.clearTransparency), Func(toonNode.clearColorScale), Parallel(ActorInterval(toon, 'swim', loop = 1, startTime = 0.0, endTime = 1.0), Wait(1.0))), Sequence(Wait(4.5999999999999996), Func(splash.play), Wait(1.0), Func(splash.destroy))), Wait(0.5), Parallel(ActorInterval(toon, 'jump', loop = 0, startTime = 0.20000000000000001), LerpScaleInterval(toonNode, 0.5, toonscale, startScale = 0.10000000000000001), Func(stopLook, toonsInBattle))), targetTrack)
    track.append(mtrack)
    if npcId != 0:
        track.append(MovieNPCSOS.teleportOut(heal, toon))
    else:
        track.append(__returnToBase(heal))
    for target in targets:
        targetToon = target['toon']
        track.append(Func(targetToon.clearChat))
    
    return track
开发者ID:ponyboy837,项目名称:Toontown-2003-Server,代码行数:89,代码来源:MovieHeal.py

示例2: __healDive

# 需要导入模块: import MovieCamera [as 别名]
# 或者: from MovieCamera import toonGroupHighShot [as 别名]
def __healDive(heal, hasInteractivePropHealBonus):
    splash = Splash.Splash(render)
    splash.reparentTo(render)
    npcId = 0
    if "npcId" in heal:
        npcId = heal["npcId"]
        toon = NPCToons.createLocalNPC(npcId)
        if toon == None:
            return
    else:
        toon = heal["toon"]
    targets = heal["target"]
    ineffective = heal["sidestep"]
    level = heal["level"]
    if npcId != 0:
        track = Sequence(MovieNPCSOS.teleportIn(heal, toon))
    else:
        track = Sequence(__runToHealSpot(heal))
    delay = 7.0
    first = 1
    targetTrack = Sequence()
    for target in targets:
        targetToon = target["toon"]
        hp = target["hp"]
        reactIval = Func(__healToon, targetToon, hp, ineffective, hasInteractivePropHealBonus)
        if first == 1:
            targetTrack.append(Wait(delay))
            first = 0
        targetTrack.append(reactIval)

    thisBattle = heal["battle"]
    toonsInBattle = thisBattle.toons
    glass = globalPropPool.getProp("glass")
    glass.setScale(4.0)
    glass.setHpr(0.0, 90.0, 0.0)
    ladder = globalPropPool.getProp("ladder")
    placeNode = NodePath("lookNode")
    diveProps = [glass, ladder]
    ladderScale = toon.getBodyScale() / 0.66
    scaleUpPoint = Point3(0.5, 0.5, 0.45) * ladderScale
    basePos = toon.getPos()
    glassOffset = Point3(0, 1.1, 0.2)
    glassToonOffset = Point3(0, 1.2, 0.2)
    splashOffset = Point3(0, 1.0, 0.4)
    ladderOffset = Point3(0, 4, 0)
    ladderToonSep = Point3(0, 1, 0) * ladderScale
    diveOffset = Point3(0, 0, 10)
    divePos = add3(add3(ladderOffset, diveOffset), ladderToonSep)
    ladder.setH(toon.getH())
    glassPos = render.getRelativePoint(toon, glassOffset)
    glassToonPos = render.getRelativePoint(toon, glassToonOffset)
    ladderPos = render.getRelativePoint(toon, ladderOffset)
    climbladderPos = render.getRelativePoint(toon, add3(ladderOffset, ladderToonSep))
    divePos = render.getRelativePoint(toon, divePos)
    topDivePos = render.getRelativePoint(toon, diveOffset)
    lookBase = render.getRelativePoint(toon, ladderOffset)
    lookTop = render.getRelativePoint(toon, add3(ladderOffset, diveOffset))
    lookGlass = render.getRelativePoint(toon, glassOffset)
    splash.setPos(splashOffset)
    walkToLadderTime = 1.0
    climbTime = 5.0
    diveTime = 1.0
    ladderGrowTime = 1.5
    splash.setPos(glassPos)
    toonNode = toon.getGeomNode()
    placeNode.reparentTo(render)
    placeNode.setScale(5.0)
    placeNode.setPos(toon.getPos(render))
    placeNode.setHpr(toon.getHpr(render))
    toonscale = toonNode.getScale()
    toonFacing = toon.getHpr()
    if base.localAvatar in thisBattle.activeToons:
        propTrack = Sequence(
            Func(MovieUtil.showProp, glass, render, glassPos),
            Func(MovieUtil.showProp, ladder, render, ladderPos),
            Func(toonsLook, toonsInBattle, placeNode, Point3(0, 0, 0)),
            Func(placeNode.setPos, lookBase),
            LerpScaleInterval(ladder, ladderGrowTime, scaleUpPoint, startScale=MovieUtil.PNT3_NEARZERO),
            Func(placeNode.setPos, lookTop),
            Wait(2.1),
            MovieCamera.toonGroupHighShot(None, 0),
            Wait(2.1),
            Func(placeNode.setPos, lookGlass),
            Wait(0.4),
            MovieCamera.allGroupLowShot(None, 0),
            Wait(1.8),
            LerpScaleInterval(ladder, ladderGrowTime, MovieUtil.PNT3_NEARZERO, startScale=scaleUpPoint),
            Func(MovieUtil.removeProps, diveProps),
        )
    else:
        propTrack = Sequence(
            Func(MovieUtil.showProp, glass, render, glassPos),
            Func(MovieUtil.showProp, ladder, render, ladderPos),
            Func(toonsLook, toonsInBattle, placeNode, Point3(0, 0, 0)),
            Func(placeNode.setPos, lookBase),
            LerpScaleInterval(ladder, ladderGrowTime, scaleUpPoint, startScale=MovieUtil.PNT3_NEARZERO),
            Func(placeNode.setPos, lookTop),
            Wait(4.2),
            Func(placeNode.setPos, lookGlass),
            Wait(2.2),
#.........这里部分代码省略.........
开发者ID:xJollibee,项目名称:src,代码行数:103,代码来源:MovieHeal.py


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