Example #1
0
    def start(self):
        SoundGag.start(self)
        tracks = Parallel()
        delayTime = 2.45
        delayUntilAppearSound = 1.0
        INSTRUMENT_SCALE_MODIFIER = 0.5
        instrMin = Vec3(0.001, 0.001, 0.001)
        instrMax1 = Vec3(0.1, 0.1, 0.1)
        instrMax1 *= INSTRUMENT_SCALE_MODIFIER
        instrMax2 = Vec3(0.3, 0.3, 0.3)
        instrMax2 *= INSTRUMENT_SCALE_MODIFIER
        instrStretch = Vec3(0.4, 0.4, 0.4)
        instrStretch *= INSTRUMENT_SCALE_MODIFIER

        def setInstrumentStats():
            self.gag.setPos(-0.8, -0.9, 0.2)
            self.gag.setHpr(145, 0, 0)
            self.gag.setScale(instrMin)

        megaphoneSh = Sequence(Func(self.placeProp, self.handJoint, self.megaphone), Func(self.placeProp, self.handJoint, self.gag), Func(setInstrumentStats))
        grow = self.getScaleIntervals(self.gag, duration=1, startScale=instrMin, endScale=instrMax1)
        instrumentAppear = Parallel(grow)
        stretchInstr = self.getScaleBlendIntervals(self.gag, duration=0.3, startScale=instrMax2, endScale=instrStretch, blendType='easeOut')
        backInstr = self.getScaleBlendIntervals(self.gag, duration=1.0, startScale=instrStretch, endScale=instrMin, blendType='easeIn')
        spinInstr = LerpHprInterval(self.gag, duration=1.5, startHpr=Vec3(145, 0, 0), hpr=Vec3(145, 0, 90), blendType='easeInOut')
        attackTrack = Parallel(Sequence(Wait(0.2), spinInstr), Sequence(stretchInstr, Wait(0.5), backInstr))
        megaphoneTrack = Sequence(megaphoneSh, Wait(delayUntilAppearSound), SoundInterval(self.appearSfx, node=self.avatar), Wait(delayTime + 1.0), instrumentAppear)
        tracks.append(megaphoneTrack)
        tracks.append(ActorInterval(self.avatar, 'sound'))
        soundTrack = Sequence(Wait(delayTime), Parallel(attackTrack, SoundInterval(self.soundSfx, node=self.avatar), Func(self.damageCogsNearby), Wait(0.4), Func(self.finish)))
        tracks.append(soundTrack)
        tracks.start()
Example #2
0
    def start(self):
        SoundGag.start(self)
        tracks = Parallel()
        delay = 2.45
        INSTRUMENT_SCALE_MODIFIER = 0.5
        instrMin = Vec3(0.001, 0.001, 0.001)
        instrMax1 = Vec3(1.7, 1.7, 1.7)
        instrMax1 *= INSTRUMENT_SCALE_MODIFIER
        instrMax2 = Vec3(2.2, 2.2, 2.2)
        instrMax2 *= INSTRUMENT_SCALE_MODIFIER
        instrStretch = Vec3(0.4, 0.4, 0.4)
        instrStretch *= INSTRUMENT_SCALE_MODIFIER
        head = self.gag.find('**/opera_singer')
        head.setPos(0, 0, 0)

        def setInstrumentStats():
            newPos = Vec3(-0.8, -0.9, 0.2)
            newPos *= 1.3
            self.gag.setPos(newPos[0], newPos[1], newPos[2])
            self.gag.setHpr(145, 0, 90)
            self.gag.setScale(instrMin)

        megaphoneShow = Sequence(Func(self.placeProp, self.handJoint, self.megaphone), Func(self.placeProp, self.handJoint, self.gag), Func(setInstrumentStats))
        grow1 = self.getScaleBlendIntervals(self.gag, duration=1, startScale=instrMin, endScale=instrMax1, blendType='easeOut')
        grow2 = self.getScaleBlendIntervals(self.gag, duration=1.1, startScale=instrMax1, endScale=instrMax2, blendType='easeIn')
        shrink2 = self.getScaleIntervals(self.gag, duration=0.1, startScale=instrMax2, endScale=instrMin)
        instrumentAppear = Parallel(Sequence(grow1, grow2, Wait(6.0), shrink2, Wait(0.4), Func(self.finish)), SoundInterval(self.appearSfx, node=self.avatar))
        delayTime = delay
        megaphoneTrack = Sequence(megaphoneShow, Wait(delayTime + 1.0), instrumentAppear)
        tracks.append(megaphoneTrack)
        toonTrack = self.__createToonInterval(0)
        tracks.append(toonTrack)
        soundTrack = Sequence(Wait(delayTime), Parallel(SoundInterval(self.soundSfx, node=self.avatar), Func(self.damageCogsNearby)))
        tracks.append(soundTrack)
        tracks.start()
Example #3
0
    def start(self):
        SoundGag.start(self)
        INSTRUMENT_SCALE_MODIFIER = 0.5
        delayTime = 2.45
        delayUntilAppearSound = 1.0
        tracks = Parallel()
        instrMin = Vec3(0.001, 0.001, 0.001)
        instrMax = Vec3(0.2, 0.2, 0.2)
        instrMax *= INSTRUMENT_SCALE_MODIFIER
        instrStretch = Vec3(0.25, 0.25, 0.25)
        instrStretch *= INSTRUMENT_SCALE_MODIFIER

        def setInstrumentStats():
            self.gag.setPos(-1.2, -1.3, 0.1)
            self.gag.setHpr(145, 0, 85)
            self.gag.setScale(instrMin)

        megaphoneShow = Sequence(Func(self.placeProp, self.handJoint, self.megaphone), Func(self.placeProp, self.handJoint, self.gag), Func(setInstrumentStats))
        grow = self.getScaleIntervals(self.gag, duration=0.2, startScale=instrMin, endScale=instrMax)
        instrumentAppear = grow
        stretchInstr = self.getScaleBlendIntervals(self.gag, duration=0.2, startScale=instrMax, endScale=instrStretch, blendType='easeOut')
        backInstr = self.getScaleBlendIntervals(self.gag, duration=0.2, startScale=instrStretch, endScale=instrMax, blendType='easeIn')
        attackTrack = Sequence(stretchInstr, backInstr)
        megaphoneTrack = Sequence(megaphoneShow, Wait(delayUntilAppearSound), SoundInterval(self.appearSfx, node=self.avatar), instrumentAppear)
        tracks.append(megaphoneTrack)
        tracks.append(ActorInterval(self.avatar, 'sound'))
        instrumentshrink = self.getScaleIntervals(self.gag, duration=0.1, startScale=instrMax, endScale=instrMin)
        soundTrack = Sequence(Wait(delayTime), Parallel(attackTrack, SoundInterval(self.soundSfx, node=self.avatar), Wait(0.2), instrumentshrink, Func(self.damageCogsNearby), Wait(0.4), Func(self.finish)))
        tracks.append(soundTrack)
        tracks.start()
Example #4
0
 def __init__(self):
     SoundGag.__init__(self,
                       CIGlobals.Foghorn,
                       'phase_5/models/props/fog_horn.bam',
                       50,
                       GagGlobals.FOG_APPEAR_SFX,
                       GagGlobals.FOG_SFX,
                       soundRange=40,
                       hitSfx=None)
     self.setImage('phase_3.5/maps/fog-horn.png')
     self.setRechargeTime(14.5)
     return
Example #5
0
 def __init__(self):
     SoundGag.__init__(self,
                       CIGlobals.Bugle,
                       'phase_5/models/props/bugle.bam',
                       11,
                       GagGlobals.BUGLE_APPEAR_SFX,
                       GagGlobals.BUGLE_SFX,
                       soundRange=25,
                       hitSfx=None)
     self.setImage('phase_3.5/maps/bugle.png')
     self.setRechargeTime(4.5)
     return
    def start(self):
        SoundGag.start(self)
        tracks = Parallel()
        INSTRUMENT_SCALE_MODIFIER = 0.5
        instrMin = Vec3(0.001, 0.001, 0.001)
        instrMax1 = Vec3(0.3, 0.4, 0.2)
        instrMax1 *= INSTRUMENT_SCALE_MODIFIER
        instrMax2 = Vec3(0.3, 0.3, 0.3)
        instrMax2 *= INSTRUMENT_SCALE_MODIFIER
        instrStretch1 = Vec3(0.3, 0.5, 0.25)
        instrStretch1 *= INSTRUMENT_SCALE_MODIFIER
        instrStretch2 = Vec3(0.3, 0.7, 0.3)
        instrStretch2 *= INSTRUMENT_SCALE_MODIFIER

        def setInstrumentStats():
            self.gag.setPos(-0.6, -0.9, 0.15)
            self.gag.setHpr(145, 0, 85)
            self.gag.setScale(instrMin)

        megaphoneShow = Sequence(Func(self.placeProp, self.handJoint, self.megaphone), Func(self.placeProp, self.handJoint, self.gag), Func(setInstrumentStats))
        grow1 = self.getScaleIntervals(self.gag, duration=0.3, startScale=instrMin, endScale=instrMax1)
        grow2 = self.getScaleIntervals(self.gag, duration=0.3, startScale=instrMax1, endScale=instrMax2)
        instrumentAppear = Parallel(Sequence(grow1, grow2))
        stretchInstr1 = self.getScaleBlendIntervals(self.gag, duration=0.1, startScale=instrMax2, endScale=instrStretch1, blendType='easeOut')
        stretchInstr2 = self.getScaleBlendIntervals(self.gag, duration=0.1, startScale=instrStretch1, endScale=instrStretch2, blendType='easeOut')
        stretchInstr = Sequence(stretchInstr1, stretchInstr2)
        backInstr = self.getScaleBlendIntervals(self.gag, duration=0.1, startScale=instrStretch2, endScale=instrMax2, blendType='easeOut')
        attackTrack = Sequence(stretchInstr, Wait(1), backInstr)
        delayTime = 2.45
        delayUntilAppearSound = 1.0
        megaphoneTrack = Sequence(megaphoneShow, Wait(delayUntilAppearSound), SoundInterval(self.appearSfx, node=self.avatar), Wait(delayTime + 1.0), instrumentAppear)
        tracks.append(megaphoneTrack)
        tracks.append(ActorInterval(self.avatar, 'sound'))
        instrumentshrink = self.getScaleIntervals(self.gag, duration=0.1, startScale=instrMax2, endScale=instrMin)
        soundTrack = Sequence(Wait(delayTime), Parallel(attackTrack, SoundInterval(self.soundSfx, node=self.avatar), Sequence(Wait(1.5), instrumentshrink), Func(self.damageCogsNearby), Wait(0.4), Func(self.finish)))
        tracks.append(soundTrack)
        tracks.start()
        self.tracks = tracks
Example #7
0
    def start(self):
        SoundGag.start(self)
        INSTRUMENT_SCALE_MODIFIER = 0.5
        tracks = Parallel()
        instrMin = Vec3(0.001, 0.001, 0.001)
        instrMax = Vec3(0.4, 0.4, 0.4)
        instrMax *= INSTRUMENT_SCALE_MODIFIER
        instrStretch = Vec3(0.5, 0.5, 0.5)
        instrStretch *= INSTRUMENT_SCALE_MODIFIER

        def setInstrumentStats():
            self.gag.setPos(-1.3, -1.4, 0.1)
            self.gag.setHpr(145, 0, 85)
            self.gag.setScale(instrMin)

        def longshake(models, num):
            inShake = self.getScaleBlendIntervals(models, duration=0.2, startScale=instrMax, endScale=instrStretch, blendType='easeInOut')
            outShake = self.getScaleBlendIntervals(models, duration=0.2, startScale=instrStretch, endScale=instrMax, blendType='easeInOut')
            i = 1
            seq = Sequence()
            while i < num:
                if i % 2 == 0:
                    seq.append(inShake)
                else:
                    seq.append(outShake)
                i += 1

            seq.start()

        megaphoneShow = Sequence(Func(self.placeProp, self.handJoint, self.megaphone), Func(self.placeProp, self.handJoint, self.gag), Func(setInstrumentStats))
        grow = self.getScaleBlendIntervals(self.gag, duration=1, startScale=instrMin, endScale=instrMax, blendType='easeInOut')
        instrumentshrink = self.getScaleIntervals(self.gag, duration=0.1, startScale=instrMax, endScale=instrMin)
        instrumentAppear = Sequence(grow, Wait(0), Func(longshake, self.gag, 5))
        megaphoneTrack = Parallel(Sequence(Wait(1.7), SoundInterval(self.soundSfx, node=self.avatar)), Sequence(megaphoneShow, Wait(1.7), instrumentAppear, Wait(1), Func(self.damageCogsNearby), instrumentshrink, Wait(0.4), Func(self.finish)))
        tracks.append(megaphoneTrack)
        tracks.append(ActorInterval(self.avatar, 'sound'))
        tracks.start()
Example #8
0
    def start(self):
        SoundGag.start(self)
        tracks = Parallel()
        INSTRUMENT_SCALE_MODIFIER = 0.5
        instrMin = Vec3(0.001, 0.001, 0.001)
        instrMax1 = Vec3(0.3, 0.4, 0.2)
        instrMax1 *= INSTRUMENT_SCALE_MODIFIER
        instrMax2 = Vec3(0.3, 0.3, 0.3)
        instrMax2 *= INSTRUMENT_SCALE_MODIFIER
        instrStretch1 = Vec3(0.3, 0.5, 0.25)
        instrStretch1 *= INSTRUMENT_SCALE_MODIFIER
        instrStretch2 = Vec3(0.3, 0.7, 0.3)
        instrStretch2 *= INSTRUMENT_SCALE_MODIFIER

        def setInstrumentStats():
            self.gag.setPos(-0.6, -0.9, 0.15)
            self.gag.setHpr(145, 0, 85)
            self.gag.setScale(instrMin)

        megaphoneShow = Sequence(Func(self.placeProp, self.handJoint, self.megaphone), Func(self.placeProp, self.handJoint, self.gag), Func(setInstrumentStats))
        grow1 = self.getScaleIntervals(self.gag, duration=0.3, startScale=instrMin, endScale=instrMax1)
        grow2 = self.getScaleIntervals(self.gag, duration=0.3, startScale=instrMax1, endScale=instrMax2)
        instrumentAppear = Parallel(Sequence(grow1, grow2))
        stretchInstr1 = self.getScaleBlendIntervals(self.gag, duration=0.1, startScale=instrMax2, endScale=instrStretch1, blendType='easeOut')
        stretchInstr2 = self.getScaleBlendIntervals(self.gag, duration=0.1, startScale=instrStretch1, endScale=instrStretch2, blendType='easeOut')
        stretchInstr = Sequence(stretchInstr1, stretchInstr2)
        backInstr = self.getScaleBlendIntervals(self.gag, duration=0.1, startScale=instrStretch2, endScale=instrMax2, blendType='easeOut')
        attackTrack = Sequence(stretchInstr, Wait(1), backInstr)
        delayTime = 2.45
        delayUntilAppearSound = 1.0
        megaphoneTrack = Sequence(megaphoneShow, Wait(delayUntilAppearSound), SoundInterval(self.appearSfx, node=self.avatar), Wait(delayTime + 1.0), instrumentAppear)
        tracks.append(megaphoneTrack)
        tracks.append(ActorInterval(self.avatar, 'sound'))
        instrumentshrink = self.getScaleIntervals(self.gag, duration=0.1, startScale=instrMax2, endScale=instrMin)
        soundTrack = Sequence(Wait(delayTime), Parallel(attackTrack, SoundInterval(self.soundSfx, node=self.avatar), Sequence(Wait(1.5), instrumentshrink), Func(self.damageCogsNearby), Wait(0.4), Func(self.finish)))
        tracks.append(soundTrack)
        tracks.start()
Example #9
0
    def start(self):
        SoundGag.start(self)
        tracks = Parallel()
        delay = 2.45
        INSTRUMENT_SCALE_MODIFIER = 0.5
        instrMin = Vec3(0.001, 0.001, 0.001)
        instrMax1 = Vec3(1.7, 1.7, 1.7)
        instrMax1 *= INSTRUMENT_SCALE_MODIFIER
        instrMax2 = Vec3(2.2, 2.2, 2.2)
        instrMax2 *= INSTRUMENT_SCALE_MODIFIER
        instrStretch = Vec3(0.4, 0.4, 0.4)
        instrStretch *= INSTRUMENT_SCALE_MODIFIER
        head = self.gag.find('**/opera_singer')
        head.setPos(0, 0, 0)

        def setInstrumentStats():
            newPos = Vec3(-0.8, -0.9, 0.2)
            newPos *= 1.3
            self.gag.setPos(newPos[0], newPos[1], newPos[2])
            self.gag.setHpr(145, 0, 90)
            self.gag.setScale(instrMin)

        megaphoneShow = Sequence(Func(self.placeProp, self.handJoint, self.megaphone), Func(self.placeProp, self.handJoint, self.gag), Func(setInstrumentStats))
        grow1 = self.getScaleBlendIntervals(self.gag, duration=1, startScale=instrMin, endScale=instrMax1, blendType='easeOut')
        grow2 = self.getScaleBlendIntervals(self.gag, duration=1.1, startScale=instrMax1, endScale=instrMax2, blendType='easeIn')
        shrink2 = self.getScaleIntervals(self.gag, duration=0.1, startScale=instrMax2, endScale=instrMin)
        instrumentAppear = Parallel(Sequence(grow1, grow2, Wait(6.0), shrink2, Wait(0.4), Func(self.finish)), SoundInterval(self.appearSfx, node=self.avatar))
        delayTime = delay
        megaphoneTrack = Sequence(megaphoneShow, Wait(delayTime + 1.0), instrumentAppear)
        tracks.append(megaphoneTrack)
        toonTrack = self.__createToonInterval(0)
        tracks.append(toonTrack)
        soundTrack = Sequence(Wait(delayTime), Parallel(SoundInterval(self.soundSfx, node=self.avatar), Func(self.damageCogsNearby)))
        tracks.append(soundTrack)
        tracks.start()
        self.tracks = tracks
Example #10
0
 def __init__(self):
     SoundGag.__init__(self, CIGlobals.Opera, 'phase_5/models/props/singing.bam', 90, appearSfx=GagGlobals.FOG_APPEAR_SFX, soundSfx=GagGlobals.OPERA_SFX, soundRange=50, hitSfx=GagGlobals.OPERA_HIT_SFX)
     self.setImage('phase_3.5/maps/opera.png')
Example #11
0
    def start(self):
        SoundGag.start(self)
        INSTRUMENT_SCALE_MODIFIER = 0.5
        delayTime = 2.45
        delayUntilAppearSound = 1.0
        tracks = Parallel()
        instrMin = Vec3(0.001, 0.001, 0.001)
        instrMax = Vec3(0.65, 0.65, 0.65)
        instrMax *= INSTRUMENT_SCALE_MODIFIER
        instrStretch = Vec3(0.6, 1.1, 0.6)
        instrStretch *= INSTRUMENT_SCALE_MODIFIER

        def setInstrumentStats():
            self.gag.setPos(-1.1, -1.4, 0.1)
            self.gag.setHpr(145, 0, 0)
            self.gag.setScale(instrMin)

        megaphoneShow = Sequence(
            Func(self.placeProp, self.handJoint, self.megaphone),
            Func(self.placeProp, self.handJoint, self.gag),
            Func(setInstrumentStats))
        grow = self.getScaleIntervals(self.gag,
                                      duration=0.2,
                                      startScale=instrMin,
                                      endScale=instrMax)
        instrumentAppear = grow
        stretchInstr = self.getScaleBlendIntervals(self.gag,
                                                   duration=0.2,
                                                   startScale=instrMax,
                                                   endScale=instrStretch,
                                                   blendType='easeOut')
        backInstr = self.getScaleBlendIntervals(self.gag,
                                                duration=0.2,
                                                startScale=instrStretch,
                                                endScale=instrMax,
                                                blendType='easeIn')
        stretchMega = self.getScaleBlendIntervals(
            self.megaphone,
            duration=0.2,
            startScale=self.megaphone.getScale(),
            endScale=0.9,
            blendType='easeOut')
        backMega = self.getScaleBlendIntervals(
            self.megaphone,
            duration=0.2,
            startScale=0.9,
            endScale=self.megaphone.getScale(),
            blendType='easeIn')
        attackTrack = Parallel(Sequence(stretchInstr, backInstr),
                               Sequence(stretchMega, backMega))
        megaphoneTrack = Sequence(
            megaphoneShow, Wait(delayUntilAppearSound),
            SoundInterval(self.appearSfx, node=self.avatar), instrumentAppear)
        tracks.append(megaphoneTrack)
        tracks.append(ActorInterval(self.avatar, 'sound'))
        instrumentshrink = self.getScaleIntervals(self.gag,
                                                  duration=0.1,
                                                  startScale=instrMax,
                                                  endScale=instrMin)
        soundTrack = Sequence(
            Wait(delayTime),
            Parallel(attackTrack, SoundInterval(self.soundSfx,
                                                node=self.avatar), Wait(0.2),
                     instrumentshrink, Func(self.damageCogsNearby), Wait(0.4),
                     Func(self.finish)))
        tracks.append(soundTrack)
        tracks.start()
        self.tracks = tracks
Example #12
0
 def __init__(self):
     SoundGag.__init__(self, CIGlobals.Whistle, 'phase_5/models/props/whistle.bam', 7, GagGlobals.WHISTLE_APPEAR_SFX, GagGlobals.WHISTLE_SFX, hitSfx=None)
     self.setImage('phase_3.5/maps/whistle.png')
     return
Example #13
0
 def __init__(self):
     SoundGag.__init__(self, CIGlobals.Aoogah, 'phase_5/models/props/aoogah.bam', 16, GagGlobals.AOOGAH_APPEAR_SFX, GagGlobals.AOOGAH_SFX, soundRange=30, hitSfx=None)
     self.setImage('phase_3.5/maps/aoogah.png')
     self.setRechargeTime(5.5)
     return
Example #14
0
 def __init__(self):
     SoundGag.__init__(self, CIGlobals.BikeHorn, 'phase_5/models/props/bikehorn.bam', 5, GagGlobals.BIKE_HORN_APPEAR_SFX, GagGlobals.BIKE_HORN_SFX, hitSfx=None)
     self.setImage('phase_3.5/maps/bike-horn.png')
     return
Example #15
0
 def __init__(self):
     SoundGag.__init__(self, CIGlobals.Opera, 'phase_5/models/props/singing.bam', 90, appearSfx=GagGlobals.FOG_APPEAR_SFX, soundSfx=GagGlobals.OPERA_SFX, soundRange=50, hitSfx=GagGlobals.OPERA_HIT_SFX)
     self.setImage('phase_3.5/maps/opera.png')
Example #16
0
 def __init__(self):
     SoundGag.__init__(self, CIGlobals.ElephantHorn, 'phase_5/models/props/elephant.bam', 21, GagGlobals.ELEPHANT_APPEAR_SFX, GagGlobals.ELEPHANT_SFX, soundRange=35, hitSfx=None)
     self.setImage('phase_3.5/maps/elephant-horn.png')
     return
 def __init__(self):
     SoundGag.__init__(self, CIGlobals.ElephantHorn, 'phase_5/models/props/elephant.bam', 21, GagGlobals.ELEPHANT_APPEAR_SFX, GagGlobals.ELEPHANT_SFX, soundRange=35, hitSfx=None)
     self.setImage('phase_3.5/maps/elephant-horn.png')
     self.setRechargeTime(6.5)
     return
Example #18
0
 def __init__(self):
     SoundGag.__init__(self, CIGlobals.Foghorn, 'phase_5/models/props/fog_horn.bam', 50, GagGlobals.FOG_APPEAR_SFX, GagGlobals.FOG_SFX, soundRange=40, hitSfx=None)
     self.setImage('phase_3.5/maps/fog-horn.png')
     return
Example #19
0
 def __init__(self):
     SoundGag.__init__(self, CIGlobals.Bugle, 'phase_5/models/props/bugle.bam', 11, GagGlobals.BUGLE_APPEAR_SFX, GagGlobals.BUGLE_SFX, soundRange=25, hitSfx=None)
     self.setImage('phase_3.5/maps/bugle.png')
     return
    def start(self):
        SoundGag.start(self)
        INSTRUMENT_SCALE_MODIFIER = 0.5
        tracks = Parallel()
        instrMin = Vec3(0.001, 0.001, 0.001)
        instrMax = Vec3(0.4, 0.4, 0.4)
        instrMax *= INSTRUMENT_SCALE_MODIFIER
        instrStretch = Vec3(0.5, 0.5, 0.5)
        instrStretch *= INSTRUMENT_SCALE_MODIFIER

        def setInstrumentStats():
            self.gag.setPos(-1.3, -1.4, 0.1)
            self.gag.setHpr(145, 0, 85)
            self.gag.setScale(instrMin)

        def longshake(models, num):
            inShake = self.getScaleBlendIntervals(models,
                                                  duration=0.2,
                                                  startScale=instrMax,
                                                  endScale=instrStretch,
                                                  blendType='easeInOut')
            outShake = self.getScaleBlendIntervals(models,
                                                   duration=0.2,
                                                   startScale=instrStretch,
                                                   endScale=instrMax,
                                                   blendType='easeInOut')
            i = 1
            seq = Sequence()
            while i < num:
                if i % 2 == 0:
                    seq.append(inShake)
                else:
                    seq.append(outShake)
                i += 1

            seq.start()

        megaphoneShow = Sequence(
            Func(self.placeProp, self.handJoint, self.megaphone),
            Func(self.placeProp, self.handJoint, self.gag),
            Func(setInstrumentStats))
        grow = self.getScaleBlendIntervals(self.gag,
                                           duration=1,
                                           startScale=instrMin,
                                           endScale=instrMax,
                                           blendType='easeInOut')
        instrumentshrink = self.getScaleIntervals(self.gag,
                                                  duration=0.1,
                                                  startScale=instrMax,
                                                  endScale=instrMin)
        instrumentAppear = Sequence(grow, Wait(0),
                                    Func(longshake, self.gag, 5))
        megaphoneTrack = Parallel(
            Sequence(Wait(1.7), SoundInterval(self.soundSfx,
                                              node=self.avatar)),
            Sequence(megaphoneShow, Wait(1.7), instrumentAppear, Wait(1),
                     Func(self.damageCogsNearby), instrumentshrink, Wait(0.4),
                     Func(self.finish)))
        tracks.append(megaphoneTrack)
        tracks.append(ActorInterval(self.avatar, 'sound'))
        tracks.start()
        self.tracks = tracks
 def __init__(self):
     SoundGag.__init__(self, CIGlobals.BikeHorn, 'phase_5/models/props/bikehorn.bam', 5, GagGlobals.BIKE_HORN_APPEAR_SFX, GagGlobals.BIKE_HORN_SFX, hitSfx=None)
     self.setImage('phase_3.5/maps/bike-horn.png')
     self.setRechargeTime(2.5)
     return
Example #22
0
 def __init__(self):
     SoundGag.__init__(self, CIGlobals.Aoogah, 'phase_5/models/props/aoogah.bam', 16, GagGlobals.AOOGAH_APPEAR_SFX, GagGlobals.AOOGAH_SFX, soundRange=30, hitSfx=None)
     self.setImage('phase_3.5/maps/aoogah.png')
     return