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");
     }
 }
예제 #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;
        }