Exemplo n.º 1
0
 def makeNodePath(self):
     if self.type == 0:
         self.nodePath = DroppedGag(self.uniqueName('gag'), base.race.banana)
         if self.billboard:
             self.nodePath.setBillboardPointEye()
         self.nodePath.setScale(0.9 * self.scale)
     if self.type == 1:
         self.nodePath = DroppedGag(self.uniqueName('gag'), base.race.banana)
         if self.billboard:
             self.nodePath.setBillboardPointEye()
         self.nodePath.setScale(4.0 * self.scale)
 def __init__(self, parent, slot, testPos):
     DirectObject.DirectObject.__init__(self)
     self.parent = parent
     self.name = 'gag-' + str(slot)
     self.geom = DroppedGag(self.name, base.race.qbox)
     self.geom.dropShadow.setScale(0.69999999999999996)
     self.geom.setPos(testPos + Vec3(0, 0, -1))
     qc = CollisionTube(Point3(0, 0, -2.5), Point3(0, 0, 2.5), 1)
     self.gagnp = NodePath(CollisionNode(self.name))
     self.gagnp.node().addSolid(qc)
     self.gagnp.reparentTo(self.geom)
     self.gagnp.node().setIntoCollideMask(BitMask32(32768))
     self.gagnp.node().setFromCollideMask(BitMask32(32768))
     self.slot = slot
     self.type = 0
     self.accept('imIn-' + self.name, self.hitGag)
     self.pickupSound = base.loadSfx('phase_6/audio/sfx/KART_getGag.mp3')
     self.fadeout = None