Пример #1
0
 def __init__(self, name, model, damage, hitSfx, anim = None, doesAutoRelease = True):
     Gag.__init__(self, name, model, damage, GagType.TRAP, hitSfx, anim = anim, autoRelease = doesAutoRelease)
     self.hitSfx = None
     self.entity = None
     self.timeout = 3.0
     if game.process == 'client':
         self.hitSfx = base.audio3d.loadSfx(hitSfx)
Пример #2
0
 def __init__(self,
              name,
              model,
              minHeal,
              maxHeal,
              efficiency,
              healSfx,
              playRate,
              anim=None):
     Gag.__init__(self,
                  name,
                  model,
                  0,
                  GagType.TOON_UP,
                  healSfx,
                  anim=anim,
                  playRate=playRate,
                  scale=1,
                  autoRelease=False)
     self.minHeal = minHeal
     self.maxHeal = maxHeal
     self.efficiency = efficiency
     self.lHandJoint = None
     self.hips = None
     self.PNTNEARZERO = Point3(0.01, 0.01, 0.01)
     self.PNTNORMAL = Point3(1, 1, 1)
     self.healAmount = None
    def __init__(self,
                 name,
                 model,
                 damage,
                 appearSfx,
                 soundSfx,
                 soundRange=18,
                 hitSfx=None):
        Gag.__init__(self,
                     name,
                     model,
                     damage,
                     GagType.SOUND,
                     hitSfx,
                     playRate=1,
                     anim=None,
                     scale=1,
                     autoRelease=True)
        self.appearSfx = None
        self.soundSfx = None
        self.soundRange = soundRange
        self.megaphonePath = 'phase_5/models/props/megaphone.bam'
        self.megaphone = None
        self.tracks = None
        self.timeout = 5.0

        if game.process == 'client':
            self.appearSfx = base.audio3d.loadSfx(appearSfx)
            self.soundSfx = base.audio3d.loadSfx(soundSfx)
Пример #4
0
 def __init__(self,
              name,
              model,
              damage,
              hitSfx,
              splatColor,
              anim=None,
              scale=1):
     Gag.__init__(self,
                  name,
                  model,
                  damage,
                  GagType.THROW,
                  hitSfx,
                  anim=anim,
                  scale=scale)
     self.splatScale = GagGlobals.splatSizes[self.name]
     self.splatColor = splatColor
     self.entities = []
     self.timeout = 1.0
     self.power = 50
     self.powerBar = None
     self.tossPieStart = 0
     self.pieSpeed = 0.2
     self.pieExponent = 0.75
Пример #5
0
 def __init__(self, name, model, damage, hitSfx, anim = None, doesAutoRelease = True):
     Gag.__init__(self, name, model, damage, GagType.TRAP, hitSfx, anim=anim, autoRelease=doesAutoRelease)
     self.hitSfx = None
     self.entity = None
     if game.process == 'client':
         self.hitSfx = base.audio3d.loadSfx(hitSfx)
     return
Пример #6
0
 def __init__(self, name, model, minHeal, maxHeal, efficiency, healSfx, playRate, anim = None):
     Gag.__init__(self, name, model, 0, GagType.TOON_UP, healSfx, anim=anim, playRate=playRate, scale=1, autoRelease=False)
     self.minHeal = minHeal
     self.maxHeal = maxHeal
     self.efficiency = efficiency
     self.lHandJoint = None
     self.hips = None
     self.PNTNEARZERO = Point3(0.01, 0.01, 0.01)
     self.PNTNORMAL = Point3(1, 1, 1)
     self.healAmount = None
     return
Пример #7
0
 def __init__(self, name, model, damage, appearSfx, soundSfx, soundRange = 18, hitSfx = None):
     Gag.__init__(self, name, model, damage, GagType.SOUND, hitSfx, playRate=1, anim=None, scale=1, autoRelease=True)
     self.appearSfx = None
     self.soundSfx = None
     self.soundRange = soundRange
     self.megaphonePath = 'phase_5/models/props/megaphone.bam'
     self.megaphone = None
     if game.process == 'client':
         self.appearSfx = base.audio3d.loadSfx(appearSfx)
         self.soundSfx = base.audio3d.loadSfx(soundSfx)
     return
Пример #8
0
 def __init__(self, name, model, anim, damage, hitSfx, missSfx, scale, playRate):
     Gag.__init__(self, name, model, damage, GagType.DROP, hitSfx, anim=anim, playRate=playRate, scale=scale, autoRelease=True)
     LocationGag.__init__(self, 10, 50)
     self.missSfx = None
     self.fallSoundPath = 'phase_5/audio/sfx/incoming_whistleALT.mp3'
     self.fallSoundInterval = None
     self.fallSfx = None
     self.chooseLocFrame = 34
     self.completeFrame = 77
     self.collHandlerF = CollisionHandlerFloor()
     self.fallDuration = 0.75
     self.isDropping = False
     if game.process == 'client':
         self.missSfx = base.audio3d.loadSfx(missSfx)
         self.fallSfx = base.audio3d.loadSfx(self.fallSoundPath)
     return
Пример #9
0
    def __init__(self,
                 name,
                 model,
                 damage,
                 hitSfx,
                 spraySfx,
                 missSfx,
                 toonAnim,
                 enableReleaseFrame,
                 completeSquirtFrame,
                 startAnimFrame=0,
                 scale=1,
                 playRate=1):
        Gag.__init__(self,
                     name,
                     model,
                     damage,
                     GagType.SQUIRT,
                     hitSfx,
                     scale=scale,
                     autoRelease=True,
                     playRate=playRate)
        self.sprayScale = GagGlobals.splatSizes.get(self.name)
        self.spraySfx = None
        self.missSfx = None
        self.origin = None
        self.sprayRange = None
        self.spray = None
        self.sprayJoint = None
        self.canSquirt = False
        self.hitSomething = False
        self.toonAnim = toonAnim
        self.startAnimFrame = 0
        self.enableReleaseFrame = enableReleaseFrame
        self.completeSquirtFrame = completeSquirtFrame
        self.lastFrame = 0
        self.tracks = None
        self.sprayTrack = None
        self.sprayAttempt = None
        self.sprayRotation = Vec3(0, 0, 0)

        if game.process == 'client':
            if spraySfx:
                self.spraySfx = base.audio3d.loadSfx(spraySfx)
            if missSfx:
                self.missSfx = base.audio3d.loadSfx(missSfx)
Пример #10
0
 def __init__(self, name, model, damage, hitSfx, spraySfx, missSfx, toonAnim, enableReleaseFrame, completeSquirtFrame, startAnimFrame = 0, scale = 1, playRate = 1):
     Gag.__init__(self, name, model, damage, GagType.SQUIRT, hitSfx, scale=scale, autoRelease=True, playRate=playRate)
     self.sprayScale = GagGlobals.splatSizes.get(self.name)
     self.spraySfx = None
     self.missSfx = None
     self.origin = None
     self.sprayRange = None
     self.spray = None
     self.sprayJoint = None
     self.canSquirt = False
     self.hitSomething = False
     self.toonAnim = toonAnim
     self.startAnimFrame = 0
     self.enableReleaseFrame = enableReleaseFrame
     self.completeSquirtFrame = completeSquirtFrame
     self.lastFrame = 0
     if game.process == 'client':
         if spraySfx:
             self.spraySfx = base.audio3d.loadSfx(spraySfx)
         if missSfx:
             self.missSfx = base.audio3d.loadSfx(missSfx)
     return
    def __init__(self, name, model, anim, damage, hitSfx, missSfx, scale,
                 playRate):
        Gag.__init__(self,
                     name,
                     model,
                     damage,
                     GagType.DROP,
                     hitSfx,
                     anim=anim,
                     playRate=playRate,
                     scale=scale,
                     autoRelease=True)
        LocationGag.__init__(self, 10, 50)
        self.missSfx = None
        self.fallSoundPath = 'phase_5/audio/sfx/incoming_whistleALT.ogg'
        self.fallSoundInterval = None
        self.fallSfx = None
        self.chooseLocFrame = 34
        self.completeFrame = 77
        self.collHandlerF = CollisionHandlerFloor()
        self.fallDuration = 0.75
        self.isDropping = False
        self.timeout = 3.0
        if game.process == 'client':
            self.missSfx = base.audio3d.loadSfx(missSfx)
            self.fallSfx = base.audio3d.loadSfx(self.fallSoundPath)

        # Variables to handle the drop preview with large drops.
        self.crashSite = None
        self.crashSiteGag = None
        self.crashSiteShadow = None
        self.crashSiteIval = None
        self.crashStartPos = None
        self.crashEndPos = None
        self.crashBegun = False
        self.shadowIdleTaskName = 'Handle-IdleShadow'
        self.shadowIdleTime = 0.0
Пример #12
0
 def __init__(self, name, model, damage, hitSfx, splatColor, anim = None, scale = 1):
     Gag.__init__(self, name, model, damage, GagType.THROW, hitSfx, anim=anim, scale=scale)
     self.splatScale = GagGlobals.splatSizes[self.name]
     self.splatColor = splatColor
     self.entities = []