Esempio n. 1
0
 public void InitEffect(SupplyEffectSettingsComponent settings)
 {
     this.animationPlayer   = new SupplyAnimationPlayer(this.animator, AnimationParameters.DAMAGE_ACTIVE);
     this.mainMaterial      = TankMaterialsUtil.GetMainMaterial(this.renderer);
     this.ddDetailsMaterial = TankMaterialsUtil.GetMaterialForDoubleDamageDetails(this.renderer);
     this.soundEffect.Init(base.transform);
     this.usualEmissionColor = this.mainMaterial.GetColor("_EmissionColor");
     this.smoothHeater       = !settings.LightIsEnabled ? new SmoothHeater(this.burningTimeInMs, this.ddDetailsMaterial, this) : new SmoothHeaterLighting(this.burningTimeInMs, this.ddDetailsMaterial, this, this.light);
     this.prepared           = true;
 }
Esempio n. 2
0
        public void InitEffect(SupplyEffectSettingsComponent settings)
        {
            this.animationPlayer = new SupplyAnimationPlayer(this.animator, AnimationParameters.SPEED_ACTIVE);
            this.effectInstances = SupplyEffectUtil.InstantiateEffect(this.effectPrefab, this.effectPoints);
            this.soundEffect.Init(base.transform);
            Material materialForNitroDetails = TankMaterialsUtil.GetMaterialForNitroDetails(this.renderer);

            this.smoothHeater         = !settings.LightIsEnabled ? new SmoothHeater(this.burningTimeInMs, materialForNitroDetails, this) : new SmoothHeaterLighting(this.burningTimeInMs, materialForNitroDetails, this, this.lightContainer);
            this.effectInstancesCount = this.effectInstances.Length;
            this.prepared             = true;
        }