def setVisible(self, value):
     if self.__triggered:
         if self.visible == value:
             return
         if value:
             self.attach()
     EffectBase.setVisible(self, value)
 def __init__(self, properties, attachProperties, effectManager):
     EffectBase.__init__(self, properties, attachProperties, effectManager)
     self.__pixie = None
     particleFile = self.properties['particleFile']
     if particleFile is not None and particleFile != '':
         Pixie.createBG(particleFile, self.__onParticleLoaded)
     return
Exemple #3
0
 def __init__(self, properties, attachProperties, effectManager):
     EffectBase.__init__(self, properties, attachProperties, effectManager)
     if 'uniqueId' not in properties:
         LOG_ERROR('Unknown uniqueId property for Jet effect!',
                   properties['id'])
         properties['uniqueId'] = ''
     self.__jet = BigWorld.Jet(
         properties['uniqueId'] + self.attachProperties['node'].name,
         self.properties['texture'])
     self.__jet.threshold = float(self.properties['threshold'])
     self.__jet.animDuration = float(self.properties['animDuration'])
     self.__jet.angleScale = float(self.properties['angleScale'])
     self.__jet.fadeInTime = float(self.properties['fadeInTime'])
     self.__jet.radiusMin = float(self.properties['radiusMin'])
     self.__jet.radiusMul = float(self.properties['radiusMul'])
     self.__jet.radiusPow = float(self.properties['radiusPow'])
     self.__jet.scaleMin = float(self.properties['scaleMin'])
     self.__jet.scaleMul = float(self.properties['scaleMul'])
     self.__jet.scalePow = float(self.properties['scalePow'])
     self.__jet.alphaMin = float(self.properties['alphaMin'])
     self.__jet.alphaMul = float(self.properties['alphaMul'])
     self.__jet.alphaPow = float(self.properties['alphaPow'])
     self.__jet.colorR = float(self.properties['colorR'])
     self.__jet.colorG = float(self.properties['colorG'])
     self.__jet.colorB = float(self.properties['colorB'])
     self.__jet.colorA = float(self.properties['colorA'])
     self.__jet.particleWidth = float(self.properties['particleWidth'])
     self.__jet.particleLen = float(self.properties['particleLen'])
     self.attach()
 def detach(self):
     if not self.attached:
         return
     else:
         if self.__pixie is not None and self.effectAttachNode is not None:
             self.effectAttachNode.detach(self.__pixie)
         EffectBase.detach(self)
         return
Exemple #5
0
 def attach(self):
     EffectBase.attach(self)
     if self.__loft is not None and self.effectAttachNode is not None:
         self.effectAttachNode.attach(self.__loft)
         self.__loft.enabled = self.visible
     else:
         self.destroy()
     return
Exemple #6
0
 def setVisible(self, value):
     if self.visible == value:
         return
     else:
         EffectBase.setVisible(self, value)
         if self.__loft is not None:
             self.__loft.enabled = self.visible
         return
 def attach(self):
     if self.delayed or self.attached:
         return
     else:
         EffectBase.attach(self)
         if self.__pixie is not None and self.effectAttachNode is not None:
             self.effectAttachNode.attach(self.__pixie)
             self.setVisible(self.visible)
         else:
             self.destroy()
         return
 def detach(self):
     if not self.attached:
         return
     else:
         if self.__pixie is not None and self.effectAttachNode is not None and self.attached:
             self.effectAttachNode.detach(self.__pixie)
         if self.callbackId is not None:
             BigWorld.cancelCallback(self.callbackId)
             self.callbackId = None
         EffectBase.detach(self)
         return
 def __init__(self, properties, attachProperties, effectManager):
     EffectBase.__init__(self, properties, attachProperties, effectManager)
     self.callbackId = None
     self.__pixie = None
     self.__triggered = properties.get('alias', None) is not None
     self.force = 0
     if 'force' in self.properties:
         self.force = int(self.properties['force'])
     particleFile = self.properties['particleFile']
     if particleFile is not None and particleFile != '':
         Pixie.createBG(particleFile, self.__onParticleLoaded)
     return
    def setVisible(self, value):
        EffectBase.setVisible(self, value)
        try:
            if self.__pixie is not None:
                for i in range(0, self.__pixie.nSystems()):
                    system = self.__pixie.system(i)
                    for action in system.actions:
                        if hasattr(action, 'timeTriggered'):
                            action.timeTriggered = value

        except:
            LOG_CURRENT_EXCEPTION()

        return
Exemple #11
0
 def __init__(self, properties, attachProperties, effectManager):
     EffectBase.__init__(self, properties, attachProperties, effectManager)
     self.__loft = None
     if IS_EDITOR:
         return
     else:
         loftTexture = self.properties['loftTexture']
         loftHeight = float(self.properties['loftHeight'])
         loftAge = float(self.properties['loftAge'])
         loftGrownStage = int(self.properties['loftGrownStage'])
         self.__loft = BigWorld.Loft(loftTexture)
         self.__loft.maxAge = loftAge
         self.__loft.height = loftHeight
         self.__loft.colour = (255, 255, 255, 25)
         self.__loft.grownStage = loftGrownStage
         self.attach()
         return
 def attach(self):
     if self.delayed or self.attached:
         return
     else:
         EffectBase.attach(self)
         if self.__pixie is not None and self.effectAttachNode is not None:
             self.effectAttachNode.attach(self.__pixie)
             if self.force == 0:
                 self.__pixie.force()
             else:
                 self.__pixie.force(self.force)
             effectDuration = self.__pixie.duration()
             self.callbackId = BigWorld.callback(effectDuration * 1.1,
                                                 self.__onParticleTimeEnd)
         else:
             self.destroy()
         return
Exemple #13
0
 def destroy(self):
     EffectBase.destroy(self)
     if self.__loft is not None:
         self.__loft.enabled = False
         self.__loft = None
     return
Exemple #14
0
 def detach(self):
     if self.__loft is not None and self.effectAttachNode is not None:
         self.effectAttachNode.detach(self.__loft)
     EffectBase.detach(self)
     return
 def destroy(self):
     EffectBase.destroy(self)
     self.__pixie = None
     return
Exemple #16
0
 def __init__(self, properties, attachProperties, effectManager):
     EffectBase.__init__(self, properties, attachProperties, effectManager)
 def destroy(self):
     self.detach()
     EffectBase.destroy(self)
     self.__pixie = None
     self.callbackId = None
     return