Exemple #1
0
 def startBurning(self):
     if not self.postInvasionObjs:
         return
     parent = self.postInvasionObjs[0].getParent()
     builder = self.getParentObj().builder
     uid = parent.getNetTag('uid')
     visZone = parent.getNetTag('visZone')
     effectList = []
     if not self.fire_one:
         self.fire_one = Fire.getEffect(1)
     if self.fire_one:
         self.fire_one.reparentTo(parent)
         self.fire_one.setPos(-62, -15, 28)
         self.fire_one.setEffectScale(0.75)
         self.fire_one.setTag('uid', uid)
         self.fire_one.setTag('visZone', visZone)
         builder.registerEffect(self.fire_one)
         effectList.append(self.fire_one)
     if not self.fire_two:
         self.fire_two = Fire.getEffect(1)
     if self.fire_two:
         self.fire_two.reparentTo(parent)
         self.fire_two.setPos(-40, -15, 28)
         self.fire_two.setEffectScale(0.75)
         self.fire_two.setTag('uid', uid)
         self.fire_two.setTag('visZone', visZone)
         builder.registerEffect(self.fire_two)
         effectList.append(self.fire_two)
     if not self.fire_three:
         self.fire_three = Fire.getEffect(1)
     if self.fire_three:
         self.fire_three.reparentTo(parent)
         self.fire_three.setPos(60, -6, 35)
         self.fire_three.setEffectScale(1.5)
         self.fire_three.setTag('uid', uid)
         self.fire_three.setTag('visZone', visZone)
         builder.registerEffect(self.fire_three)
         effectList.append(self.fire_three)
     if not self.smoke_one:
         self.smoke_one = MansionSmoke.getEffect(1)
     if self.smoke_one:
         self.smoke_one.reparentTo(parent)
         self.smoke_one.setPos(-51, -4, 30)
         self.smoke_one.setEffectScale(1.0)
         self.smoke_one.setTag('uid', uid)
         self.smoke_one.setTag('visZone', visZone)
         builder.registerEffect(self.smoke_one)
         effectList.append(self.smoke_one)
     if not self.smoke_two:
         self.smoke_two = MansionSmoke.getEffect(1)
     if self.smoke_one:
         self.smoke_two.reparentTo(parent)
         self.smoke_two.setPos(58, -4, 36)
         self.smoke_two.setEffectScale(1.0)
         self.smoke_two.setTag('uid', uid)
         self.smoke_two.setTag('visZone', visZone)
         builder.registerEffect(self.smoke_two)
         effectList.append(self.smoke_two)
     builder.validateEffectSet(set(effectList))
 def startBurning(self):
     if not self.postInvasionObjs:
         return None
     
     parent = self.postInvasionObjs[0].getParent()
     builder = self.getParentObj().builder
     uid = parent.getNetTag('uid')
     visZone = parent.getNetTag('visZone')
     effectList = []
     if not self.fire_one:
         self.fire_one = Fire.getEffect(1)
     
     if self.fire_one:
         self.fire_one.reparentTo(parent)
         self.fire_one.setPos(6, -4, 15)
         self.fire_one.setEffectScale(1.1000000000000001)
         self.fire_one.setTag('uid', uid)
         self.fire_one.setTag('visZone', visZone)
         builder.registerEffect(self.fire_one)
         effectList.append(self.fire_one)
     
     if not self.smoke_one:
         self.smoke_one = MansionSmoke.getEffect(1)
     
     if self.smoke_one:
         self.smoke_one.reparentTo(parent)
         self.smoke_one.setPos(6, -6, 24)
         self.smoke_one.setEffectScale(0.5)
         self.smoke_one.setTag('uid', uid)
         self.smoke_one.setTag('visZone', visZone)
         builder.registerEffect(self.smoke_one)
         effectList.append(self.smoke_one)
     
     builder.validateEffectSet(set(effectList))
 def startBurning(self):
     if not self.postInvasionObjs:
         return None
     
     parent = self.postInvasionObjs[0].getParent()
     builder = self.getParentObj().builder
     uid = parent.getNetTag('uid')
     visZone = parent.getNetTag('visZone')
     effectList = []
     if not self.fire_one:
         self.fire_one = Fire.getEffect(1)
     
     if self.fire_one:
         self.fire_one.reparentTo(parent)
         self.fire_one.setPos(6, -4, 15)
         self.fire_one.setEffectScale(1.1000000000000001)
         self.fire_one.setTag('uid', uid)
         self.fire_one.setTag('visZone', visZone)
         builder.registerEffect(self.fire_one)
         effectList.append(self.fire_one)
     
     if not self.smoke_one:
         self.smoke_one = MansionSmoke.getEffect(1)
     
     if self.smoke_one:
         self.smoke_one.reparentTo(parent)
         self.smoke_one.setPos(6, -6, 24)
         self.smoke_one.setEffectScale(0.5)
         self.smoke_one.setTag('uid', uid)
         self.smoke_one.setTag('visZone', visZone)
         builder.registerEffect(self.smoke_one)
         effectList.append(self.smoke_one)
     
     builder.validateEffectSet(set(effectList))
 def startBurning(self):
     if not self.postInvasionObjs:
         return None
     
     base.wdf = self
     builder = self.getParentObj().builder
     effectList = []
     for id in OBJ_EFFECT_PARAMS:
         parent = self.getParentWithId(OBJ_EFFECT_PARAMS[id][0])
         uid = parent.getNetTag('uid')
         visZone = parent.getNetTag('visZone')
         if not self.fireEffects.has_key(id):
             self.fireEffects[id] = Fire.getEffect(1)
         
         if self.fireEffects[id]:
             fireEffect = self.fireEffects[id]
             fireEffect.reparentTo(parent)
             fireEffect.setPos(OBJ_EFFECT_PARAMS[id][1])
             fireEffect.setEffectScale(OBJ_EFFECT_PARAMS[id][2])
             fireEffect.setTag('uid', uid)
             fireEffect.setTag('visZone', visZone)
             builder.registerEffect(fireEffect)
             effectList.append(fireEffect)
         
         if not self.smokeEffects.has_key(id):
             self.smokeEffects[id] = MansionSmoke.getEffect(1)
         
         if self.smokeEffects[id]:
             smokeEffect = self.smokeEffects[id]
             smokeEffect.reparentTo(parent)
             smokeEffect.setPos(OBJ_EFFECT_PARAMS[id][3])
             smokeEffect.setEffectScale(OBJ_EFFECT_PARAMS[id][4])
             smokeEffect.setTag('uid', uid)
             smokeEffect.setTag('visZone', visZone)
             builder.registerEffect(smokeEffect)
             effectList.append(smokeEffect)
             continue
     
     if self.fireEffects[2]:
         self.fireEffects[2].p0.emitter.setRadius(3.0)
     
     if self.fireEffects[3]:
         self.fireEffects[3].p0.emitter.setRadius(2.0)
     
     builder.validateEffectSet(set(effectList))
    def startBurning(self):
        if not self.postInvasionObjs:
            return None

        base.wdf = self
        builder = self.getParentObj().builder
        effectList = []
        for id in OBJ_EFFECT_PARAMS:
            parent = self.getParentWithId(OBJ_EFFECT_PARAMS[id][0])
            uid = parent.getNetTag('uid')
            visZone = parent.getNetTag('visZone')
            if not self.fireEffects.has_key(id):
                self.fireEffects[id] = Fire.getEffect(1)

            if self.fireEffects[id]:
                fireEffect = self.fireEffects[id]
                fireEffect.reparentTo(parent)
                fireEffect.setPos(OBJ_EFFECT_PARAMS[id][1])
                fireEffect.setEffectScale(OBJ_EFFECT_PARAMS[id][2])
                fireEffect.setTag('uid', uid)
                fireEffect.setTag('visZone', visZone)
                builder.registerEffect(fireEffect)
                effectList.append(fireEffect)

            if not self.smokeEffects.has_key(id):
                self.smokeEffects[id] = MansionSmoke.getEffect(1)

            if self.smokeEffects[id]:
                smokeEffect = self.smokeEffects[id]
                smokeEffect.reparentTo(parent)
                smokeEffect.setPos(OBJ_EFFECT_PARAMS[id][3])
                smokeEffect.setEffectScale(OBJ_EFFECT_PARAMS[id][4])
                smokeEffect.setTag('uid', uid)
                smokeEffect.setTag('visZone', visZone)
                builder.registerEffect(smokeEffect)
                effectList.append(smokeEffect)
                continue

        if self.fireEffects[2]:
            self.fireEffects[2].p0.emitter.setRadius(3.0)

        if self.fireEffects[3]:
            self.fireEffects[3].p0.emitter.setRadius(2.0)

        builder.validateEffectSet(set(effectList))
 def startBurning(self):
     if not self.postInvasionObjs:
         return None
     
     parent = self.postInvasionObjs[0].getParent()
     builder = self.getParentObj().builder
     uid = parent.getNetTag('uid')
     visZone = parent.getNetTag('visZone')
     effectList = []
     if not self.fire_one:
         self.fire_one = Fire.getEffect(1)
     
     if self.fire_one:
         self.fire_one.reparentTo(parent)
         self.fire_one.setPos(-62, -15, 28)
         self.fire_one.setEffectScale(0.75)
         self.fire_one.setTag('uid', uid)
         self.fire_one.setTag('visZone', visZone)
         builder.registerEffect(self.fire_one)
         effectList.append(self.fire_one)
     
     if not self.fire_two:
         self.fire_two = Fire.getEffect(1)
     
     if self.fire_two:
         self.fire_two.reparentTo(parent)
         self.fire_two.setPos(-40, -15, 28)
         self.fire_two.setEffectScale(0.75)
         self.fire_two.setTag('uid', uid)
         self.fire_two.setTag('visZone', visZone)
         builder.registerEffect(self.fire_two)
         effectList.append(self.fire_two)
     
     if not self.fire_three:
         self.fire_three = Fire.getEffect(1)
     
     if self.fire_three:
         self.fire_three.reparentTo(parent)
         self.fire_three.setPos(60, -6, 35)
         self.fire_three.setEffectScale(1.5)
         self.fire_three.setTag('uid', uid)
         self.fire_three.setTag('visZone', visZone)
         builder.registerEffect(self.fire_three)
         effectList.append(self.fire_three)
     
     if not self.smoke_one:
         self.smoke_one = MansionSmoke.getEffect(1)
     
     if self.smoke_one:
         self.smoke_one.reparentTo(parent)
         self.smoke_one.setPos(-51, -4, 30)
         self.smoke_one.setEffectScale(1.0)
         self.smoke_one.setTag('uid', uid)
         self.smoke_one.setTag('visZone', visZone)
         builder.registerEffect(self.smoke_one)
         effectList.append(self.smoke_one)
     
     if not self.smoke_two:
         self.smoke_two = MansionSmoke.getEffect(1)
     
     if self.smoke_one:
         self.smoke_two.reparentTo(parent)
         self.smoke_two.setPos(58, -4, 36)
         self.smoke_two.setEffectScale(1.0)
         self.smoke_two.setTag('uid', uid)
         self.smoke_two.setTag('visZone', visZone)
         builder.registerEffect(self.smoke_two)
         effectList.append(self.smoke_two)
     
     builder.validateEffectSet(set(effectList))