Exemplo 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;
 }
 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");
     }
 }
Exemplo n.º 3
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;
        }
        public void Reset()
        {
            this.temperature = 0f;
            if (this.renderer != null)
            {
                TankMaterialsUtil.SetTemperature(this.renderer, this.temperature);
            }
            int count = this.listeners.Count;

            for (int i = 0; i < count; i++)
            {
                this.listeners[i].TemperatureChanged(this.temperature);
            }
        }