Exemple #1
0
    public float GetWeight(global::PostProcessManager.Effect pp)
    {
        PostProcessVolume postProcessVolume = this.m_Volumes[(int)pp];

        if (!postProcessVolume)
        {
            DebugUtils.Assert("Missing PostProcess - " + pp.ToString(), true, DebugUtils.AssertType.Info);
            return(0f);
        }
        return(postProcessVolume.weight);
    }
Exemple #2
0
    public void SetWeight(global::PostProcessManager.Effect pp, float weight)
    {
        PostProcessVolume postProcessVolume = this.m_Volumes[(int)pp];

        if (!postProcessVolume)
        {
            DebugUtils.Assert("Missing PostProcess - " + pp.ToString(), true, DebugUtils.AssertType.Info);
            return;
        }
        postProcessVolume.weight = Mathf.Clamp01(weight);
    }
Exemple #3
0
 private void Awake()
 {
     global::PostProcessManager.s_Instance = this;
     for (int i = 0; i < base.transform.childCount; i++)
     {
         base.transform.GetChild(i).gameObject.SetActive(true);
     }
     this.m_Volumes = new PostProcessVolume[12];
     PostProcessVolume[] componentsInChildren = base.GetComponentsInChildren <PostProcessVolume>();
     for (int j = 0; j < componentsInChildren.Length; j++)
     {
         for (global::PostProcessManager.Effect effect = global::PostProcessManager.Effect.Game; effect < global::PostProcessManager.Effect.Count; effect++)
         {
             if (componentsInChildren[j].gameObject.name.EndsWith(effect.ToString()))
             {
                 this.m_Volumes[(int)effect]      = componentsInChildren[j];
                 componentsInChildren[j].priority = (float)this.GetPriority(effect);
                 this.SetWeight(effect, (effect == global::PostProcessManager.Effect.Game) ? 1f : 0f);
             }
         }
     }
 }