예제 #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;
 }
 private void Awake()
 {
     this.effectInstances = SupplyEffectUtil.InstantiateEffect(this.effectPrefab, this.effectPoints);
     this.animationPlayer = new SupplyAnimationPlayer(base.GetComponent <Animator>(), AnimationParameters.ARMOR_ACTIVE);
     this.soundEffect.Init(base.transform);
     if (this.changeEmission)
     {
         this.mainMaterial       = TankMaterialsUtil.GetMainMaterial(this.renderer);
         this.usualEmissionColor = this.mainMaterial.GetColor("_EmissionColor");
     }
 }