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
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)
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()
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()
def __init__(self, cr, initNode = True): DistributedSmoothNode.__init__(self, cr) Entity.__init__(self, initNode) BasePhysicsObject.__init__(self) self.entnum = 0
def disable(self): self.cleanupPhysics() self.entnum = None self.unload() DistributedSmoothNode.disable(self)
def wrtReparentTo(self, parent): DistributedSmoothNode.wrtReparentTo(self, parent)
def disable(self): self.stopWaterCheck() self.stopSmooth() self.cleanupPhysics() DistributedSmoothNode.disable(self)
def announceGenerate(self): self.doSetupPhysics() DistributedSmoothNode.announceGenerate(self) self.reparentTo(render) self.startSmooth() self.startWaterCheck()
def __init__(self, cr): DistributedSmoothNode.__init__(self, cr) PhysicsNodePath.__init__(self, ModelRoot('physEntity'))