mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
formatting
This commit is contained in:
parent
1a285d3c10
commit
06ffc7a5f4
@ -1,12 +1,14 @@
|
|||||||
"""ParticleInterval module: contains the ParticleInterval class"""
|
"""
|
||||||
|
Contains the ParticleInterval class
|
||||||
|
"""
|
||||||
|
|
||||||
from pandac.PandaModules import *
|
from pandac.PandaModules import *
|
||||||
from direct.directnotify.DirectNotifyGlobal import *
|
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||||
import Interval
|
from Interval import Interval
|
||||||
|
|
||||||
from direct.particles import ParticleEffect
|
from direct.particles import ParticleEffect
|
||||||
|
|
||||||
class ParticleInterval(Interval.Interval):
|
class ParticleInterval(Interval):
|
||||||
# Name counter
|
# Name counter
|
||||||
particleNum = 1
|
particleNum = 1
|
||||||
# create ParticleInterval DirectNotify category
|
# create ParticleInterval DirectNotify category
|
||||||
@ -14,12 +16,18 @@ class ParticleInterval(Interval.Interval):
|
|||||||
# Class methods
|
# Class methods
|
||||||
def __init__(self, particleEffect, parent, worldRelative=1, loop=0,
|
def __init__(self, particleEffect, parent, worldRelative=1, loop=0,
|
||||||
duration=0.0, name=None):
|
duration=0.0, name=None):
|
||||||
"""__init__(particleEffect, parent, worldRelative, loop, duration, name)
|
"""
|
||||||
|
particleEffect is ??
|
||||||
|
parent is ??
|
||||||
|
worldRelative is a boolean
|
||||||
|
loop is a boolean
|
||||||
|
duration is a float for the time
|
||||||
|
name is ??
|
||||||
"""
|
"""
|
||||||
# Generate unique name
|
# Generate unique name
|
||||||
id = 'Particle-%d' % ParticleInterval.particleNum
|
id = 'Particle-%d' % ParticleInterval.particleNum
|
||||||
ParticleInterval.particleNum += 1
|
ParticleInterval.particleNum += 1
|
||||||
if (name == None):
|
if name == None:
|
||||||
name = id
|
name = id
|
||||||
# Record instance variables
|
# Record instance variables
|
||||||
self.particleEffect = particleEffect
|
self.particleEffect = particleEffect
|
||||||
@ -28,7 +36,7 @@ class ParticleInterval(Interval.Interval):
|
|||||||
self.fLoop = loop
|
self.fLoop = loop
|
||||||
assert(duration > 0.0 or loop == 1)
|
assert(duration > 0.0 or loop == 1)
|
||||||
# Initialize superclass
|
# Initialize superclass
|
||||||
Interval.Interval.__init__(self, name, duration)
|
Interval.__init__(self, name, duration)
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
if self.particleEffect:
|
if self.particleEffect:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user