|
@@ -25,13 +25,6 @@ class ParticleEffect(NodePath):
|
|
|
self.addParticles(particles)
|
|
self.addParticles(particles)
|
|
|
self.renderParent = None
|
|
self.renderParent = None
|
|
|
|
|
|
|
|
- def start(self, parent=None, renderParent=None):
|
|
|
|
|
- assert self.notify.debug('start() - name: %s' % self.name)
|
|
|
|
|
- self.renderParent = renderParent
|
|
|
|
|
- self.enable()
|
|
|
|
|
- if parent != None:
|
|
|
|
|
- self.reparentTo(parent)
|
|
|
|
|
-
|
|
|
|
|
def cleanup(self):
|
|
def cleanup(self):
|
|
|
self.removeNode()
|
|
self.removeNode()
|
|
|
self.disable()
|
|
self.disable()
|
|
@@ -51,6 +44,13 @@ class ParticleEffect(NodePath):
|
|
|
self.forceGroupDict = {}
|
|
self.forceGroupDict = {}
|
|
|
self.particlesDict = {}
|
|
self.particlesDict = {}
|
|
|
|
|
|
|
|
|
|
+ def start(self, parent=None, renderParent=None):
|
|
|
|
|
+ assert self.notify.debug('start() - name: %s' % self.name)
|
|
|
|
|
+ self.renderParent = renderParent
|
|
|
|
|
+ self.enable()
|
|
|
|
|
+ if parent != None:
|
|
|
|
|
+ self.reparentTo(parent)
|
|
|
|
|
+
|
|
|
def enable(self):
|
|
def enable(self):
|
|
|
# band-aid added for client crash - grw
|
|
# band-aid added for client crash - grw
|
|
|
if hasattr(self, 'forceGroupDict') and hasattr(self, 'particlesDict'):
|
|
if hasattr(self, 'forceGroupDict') and hasattr(self, 'particlesDict'):
|
|
@@ -72,7 +72,7 @@ class ParticleEffect(NodePath):
|
|
|
for p in self.particlesDict.values():
|
|
for p in self.particlesDict.values():
|
|
|
p.disable()
|
|
p.disable()
|
|
|
self.fEnabled = 0
|
|
self.fEnabled = 0
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
def isEnabled(self):
|
|
def isEnabled(self):
|
|
|
"""
|
|
"""
|
|
|
Note: this may be misleading if enable(), disable() not used
|
|
Note: this may be misleading if enable(), disable() not used
|
|
@@ -207,3 +207,11 @@ class ParticleEffect(NodePath):
|
|
|
def clearToInitial(self):
|
|
def clearToInitial(self):
|
|
|
for particles in self.getParticlesList():
|
|
for particles in self.getParticlesList():
|
|
|
particles.clearToInitial()
|
|
particles.clearToInitial()
|
|
|
|
|
+
|
|
|
|
|
+ def softStop(self):
|
|
|
|
|
+ for particles in self.getParticlesList():
|
|
|
|
|
+ particles.softStop()
|
|
|
|
|
+
|
|
|
|
|
+ def softStart(self):
|
|
|
|
|
+ for particles in self.getParticlesList():
|
|
|
|
|
+ particles.softStart()
|