Exemplo n.º 1
0
        public void Lerp <T>(MaterialColorModifier.Multiplier multiplier, float normalized, bool dir) where T : ShaderProperty_Base
        {
            T local  = !dir ? ((T)this.ToProperty) : ((T)this.FromProperty);
            T local2 = !dir ? ((T)this.FromProperty) : ((T)this.ToProperty);

            local.LerpTo(multiplier, local2, this.LerpCurve.Evaluate(normalized));
        }
Exemplo n.º 2
0
        public override void LerpTo(MaterialColorModifier.Multiplier multiplier, ShaderProperty_Base to_, float normalized)
        {
            ShaderProperty_ColorBias bias = (ShaderProperty_ColorBias)to_;

            if (multiplier != null)
            {
                multiplier.mulColor = Color.Lerp(this.BiasColor, bias.BiasColor, normalized);
            }
        }
Exemplo n.º 3
0
 public void Core()
 {
     if (this._active)
     {
         this._time += Time.deltaTime * this._entity.TimeScale;
         float normalized = Mathf.Clamp01(this._time / this._duration);
         for (int i = 0; i < this._mats.Count; i++)
         {
             Material targetMat = this._mats[i].material;
             MaterialColorModifier.Multiplier colorMultiplier = this._mats[i].colorMultiplier;
             if (this._dataType == E_ShaderData.InverseTimeSpace)
             {
                 this._shaderData.Lerp <ShaderProperty_Shell>(targetMat, normalized, this.isEnableTransition);
             }
             else if (this._dataType == E_ShaderData.Transparent)
             {
                 this._shaderData.Lerp <ShaderProperty_SpecialState>(targetMat, normalized, this.isEnableTransition);
             }
             else if (this._dataType == E_ShaderData.Distortion)
             {
                 this._shaderData.Lerp <ShaderProperty_Distortion>(targetMat, normalized, this.isEnableTransition);
             }
             else if (this._dataType == E_ShaderData.ColorBias)
             {
                 this._shaderData.Lerp <ShaderProperty_ColorBias>(colorMultiplier, normalized, this.isEnableTransition);
             }
             else
             {
                 this._shaderData.Lerp <ShaderProperty_Rim>(targetMat, normalized, this.isEnableTransition);
             }
         }
         if (this._time > this._duration)
         {
             this.EndTransition();
         }
     }
 }
Exemplo n.º 4
0
 public virtual void LerpTo(MaterialColorModifier.Multiplier multiplier, ShaderProperty_Base to_, float normalized)
 {
 }