Ejemplo n.º 1
0
    def __init__(self, cr):
        DistributedSmoothNode.__init__(self, cr)
        BaseProjectileShared.__init__(self)
        BasePhysicsObject.__init__(self)
        NodePath.__init__(self, ModelRoot("BaseProjectile"))

        self.model = None
        self.impactSound = None
Ejemplo n.º 2
0
 def disable(self):
     self.stopWaterCheck()
     self.cleanupPhysics()
     if self.model:
         self.model.removeNode()
         self.model = None
     self.impactSound = None
     BaseProjectileShared.cleanup(self)
     DistributedSmoothNode.disable(self)
Ejemplo n.º 3
0
    def announceGenerate(self):
        DistributedSmoothNode.announceGenerate(self)

        self.enableThink()

        from panda3d.bsp import CPointEntity
        if isinstance(self.cEntity, CPointEntity):
            self.setPos(render, self.cEntity.getOrigin())
            self.setHpr(render, self.cEntity.getAngles())

        self.tryEntityParent()
Ejemplo n.º 4
0
 def announceGenerate(self):
     DistributedSmoothNode.announceGenerate(self)
     self.stopSmooth()
     if self.ImpactSoundPath:
         self.impactSound = base.audio3d.loadSfx(self.ImpactSoundPath)
     if self.ModelPath:
         self.model = loader.loadModel(self.ModelPath)
         self.model.reparentTo(self)
         self.model.setPos(self.ModelOrigin)
         self.model.setHpr(self.ModelAngles)
         self.model.setScale(self.ModelScale)
     self.reparentTo(render)
     self.onSpawn()
     self.startWaterCheck()
Ejemplo n.º 5
0
 def __init__(self, cr, initNode = True):
     DistributedSmoothNode.__init__(self, cr)
     Entity.__init__(self, initNode)
     BasePhysicsObject.__init__(self)
     self.entnum = 0
Ejemplo n.º 6
0
 def disable(self):
     self.cleanupPhysics()
     self.entnum = None
     self.unload()
     DistributedSmoothNode.disable(self)
Ejemplo n.º 7
0
 def wrtReparentTo(self, parent):
     DistributedSmoothNode.wrtReparentTo(self, parent)
Ejemplo n.º 8
0
 def disable(self):
     self.stopWaterCheck()
     self.stopSmooth()
     self.cleanupPhysics()
     DistributedSmoothNode.disable(self)
Ejemplo n.º 9
0
 def announceGenerate(self):
     self.doSetupPhysics()
     DistributedSmoothNode.announceGenerate(self)
     self.reparentTo(render)
     self.startSmooth()
     self.startWaterCheck()
Ejemplo n.º 10
0
 def __init__(self, cr):
     DistributedSmoothNode.__init__(self, cr)
     PhysicsNodePath.__init__(self, ModelRoot('physEntity'))