示例#1
0
 // Token: 0x06003BA7 RID: 15271 RVA: 0x001CCE9C File Offset: 0x001CB29C
 private void CheckObservers()
 {
     foreach (KeyValuePair <PostProcessingComponentBase, bool> keyValuePair in this.m_ComponentStates)
     {
         PostProcessingComponentBase key = keyValuePair.Key;
         bool enabled = key.GetModel().enabled;
         if (enabled != keyValuePair.Value)
         {
             if (enabled)
             {
                 this.m_ComponentsToEnable.Add(key);
             }
             else
             {
                 this.m_ComponentsToDisable.Add(key);
             }
         }
     }
     for (int i = 0; i < this.m_ComponentsToDisable.Count; i++)
     {
         PostProcessingComponentBase postProcessingComponentBase = this.m_ComponentsToDisable[i];
         this.m_ComponentStates[postProcessingComponentBase] = false;
         postProcessingComponentBase.OnDisable();
     }
     for (int j = 0; j < this.m_ComponentsToEnable.Count; j++)
     {
         PostProcessingComponentBase postProcessingComponentBase2 = this.m_ComponentsToEnable[j];
         this.m_ComponentStates[postProcessingComponentBase2] = true;
         postProcessingComponentBase2.OnEnable();
     }
     this.m_ComponentsToDisable.Clear();
     this.m_ComponentsToEnable.Clear();
 }
示例#2
0
 private void CheckObservers()
 {
     foreach (KeyValuePair <PostProcessingComponentBase, bool> pair in this.m_ComponentStates)
     {
         PostProcessingComponentBase key = pair.Key;
         bool enabled = key.GetModel().enabled;
         if (enabled != pair.Value)
         {
             if (enabled)
             {
                 this.m_ComponentsToEnable.Add(key);
                 continue;
             }
             this.m_ComponentsToDisable.Add(key);
         }
     }
     for (int i = 0; i < this.m_ComponentsToDisable.Count; i++)
     {
         PostProcessingComponentBase base3 = this.m_ComponentsToDisable[i];
         this.m_ComponentStates[base3] = false;
         base3.OnDisable();
     }
     for (int j = 0; j < this.m_ComponentsToEnable.Count; j++)
     {
         PostProcessingComponentBase base4 = this.m_ComponentsToEnable[j];
         this.m_ComponentStates[base4] = true;
         base4.OnEnable();
     }
     this.m_ComponentsToDisable.Clear();
     this.m_ComponentsToEnable.Clear();
 }