Пример #1
0
 public void SetBlendAmount(LutTextureManager.LutEffect effect, float blend)
 {
     if (effect != this.m_CurrentEffect)
     {
         DebugUtils.Assert("Different effect - effect = " + effect.ToString() + "current effect = " + this.m_CurrentEffect.ToString(), true, DebugUtils.AssertType.Info);
         return;
     }
     this.m_AmplifyColorEffect.BlendAmount = blend;
 }
Пример #2
0
    public void SetEffect(LutTextureManager.LutEffect effect)
    {
        LutTextureData lutTextureData;

        if (!this.m_Datas.TryGetValue(effect, out lutTextureData))
        {
            DebugUtils.Assert("Can't find effect - " + effect.ToString(), true, DebugUtils.AssertType.Info);
            return;
        }
        if (lutTextureData.m_LutTexture != null)
        {
            Resources.UnloadAsset(this.m_AmplifyColorEffect.LutTexture);
            this.m_AmplifyColorEffect.LutTexture = (Resources.Load("Textures/" + lutTextureData.m_LutTexture) as Texture);
        }
        else
        {
            this.m_AmplifyColorEffect.LutTexture = null;
        }
        if (lutTextureData.m_LutBlendTexture != null)
        {
            Resources.UnloadAsset(this.m_AmplifyColorEffect.LutBlendTexture);
            this.m_AmplifyColorEffect.LutBlendTexture = (Resources.Load("Textures/" + lutTextureData.m_LutBlendTexture) as Texture);
        }
        else
        {
            this.m_AmplifyColorEffect.LutBlendTexture = null;
        }
        if (lutTextureData.m_MaskTexture != null)
        {
            Resources.UnloadAsset(this.m_AmplifyColorEffect.MaskTexture);
            this.m_AmplifyColorEffect.MaskTexture = (Resources.Load("Textures/" + lutTextureData.m_MaskTexture) as Texture);
        }
        else
        {
            this.m_AmplifyColorEffect.MaskTexture = null;
        }
        this.m_AmplifyColorEffect.BlendAmount = lutTextureData.m_BlendAmount;
        this.m_CurrentEffect = effect;
    }