Esempio n. 1
0
    def __init__(self):
        TrapGag.__init__(self)
        LocationGag.__init__(self, 10, 50, shadowScale=0.25)

        # trapMode is the mode the trap gag is on. 0) Trapdoor/Quicksand and 1) Banana Peel, marbles, etc.

        # This keeps track of the entities we drop.
        self.entities = []

        # This is the length (in seconds) of how long an entity exists.
        self.lifeTime = 120

        # This is the minimum distance an entity has to be from another.
        self.minSafeDistance = 5

        # collRadius is the radius of the CollisionSphere that detects suits.

        # This is the sound effect called when a trap is tripped.
        self.activateSfx = None

        self.entityTrack = None

        if metadata.PROCESS == 'client':
            if self.activateSfxPath:
                self.activateSfx = base.audio3d.loadSfx(self.activateSfxPath)
 def __init__(self):
     SquirtGag.__init__(self)
     LocationGag.__init__(self, 10, 50)
     LocationGag.setShadowData(self, isCircle=True, shadowScale=0.75)
     self.setImage('phase_3.5/maps/storm-cloud.png')
     self.entities = []
     self.searchRadius = 6
     self.timeout = 3.0