private void StartFade()
 {
     if (this.Mode == EventAction_FadeScreen.FadeModes.Screen)
     {
         if (this.FadeOut)
         {
             FadeController.Instance.FadeTo(this.FadeColor, this.FadeTime, 0);
         }
         else
         {
             GameUtility.FadeIn(this.FadeTime);
         }
     }
     else
     {
         FadeController          instance = FadeController.Instance;
         TacticsUnitController[] tacticsUnitControllerArray1 = (TacticsUnitController[])null;
         TacticsUnitController[] tacticsUnitControllerArray2 = (TacticsUnitController[])null;
         if (this.ExcludeUnits != null && this.ExcludeUnits.Length > 0)
         {
             tacticsUnitControllerArray2 = new TacticsUnitController[this.ExcludeUnits.Length];
             for (int index = 0; index < tacticsUnitControllerArray2.Length; ++index)
             {
                 tacticsUnitControllerArray2[index] = TacticsUnitController.FindByUniqueName(this.ExcludeUnits[index]);
             }
         }
         if (this.IncludeUnits != null && this.IncludeUnits.Length > 0)
         {
             tacticsUnitControllerArray1 = new TacticsUnitController[this.IncludeUnits.Length];
             for (int index = 0; index < tacticsUnitControllerArray1.Length; ++index)
             {
                 tacticsUnitControllerArray1[index] = TacticsUnitController.FindByUniqueName(this.IncludeUnits[index]);
             }
         }
         instance.BeginSceneFade(this.FadeColor, this.FadeTime, tacticsUnitControllerArray2 == null ? (TacticsUnitController[])null : tacticsUnitControllerArray2, tacticsUnitControllerArray1 == null ? (TacticsUnitController[])null : tacticsUnitControllerArray1);
     }
     if (!this.Async)
     {
         return;
     }
     this.ActivateNext();
 }
 public override void GoToEndState()
 {
     if (this.Mode == EventAction_FadeScreen.FadeModes.Screen)
     {
         if (this.FadeOut)
         {
             FadeController.Instance.FadeTo(this.FadeColor, 0.0f, 0);
         }
         else
         {
             GameUtility.FadeIn(0.0f);
         }
     }
     else
     {
         FadeController          instance = FadeController.Instance;
         TacticsUnitController[] tacticsUnitControllerArray1 = (TacticsUnitController[])null;
         TacticsUnitController[] tacticsUnitControllerArray2 = (TacticsUnitController[])null;
         if (this.ExcludeUnits != null && this.ExcludeUnits.Length > 0)
         {
             tacticsUnitControllerArray2 = new TacticsUnitController[this.ExcludeUnits.Length];
             for (int index = 0; index < tacticsUnitControllerArray2.Length; ++index)
             {
                 tacticsUnitControllerArray2[index] = TacticsUnitController.FindByUniqueName(this.ExcludeUnits[index]);
             }
         }
         if (this.IncludeUnits != null && this.IncludeUnits.Length > 0)
         {
             tacticsUnitControllerArray1 = new TacticsUnitController[this.IncludeUnits.Length];
             for (int index = 0; index < tacticsUnitControllerArray1.Length; ++index)
             {
                 tacticsUnitControllerArray1[index] = TacticsUnitController.FindByUniqueName(this.IncludeUnits[index]);
             }
         }
         instance.BeginSceneFade(this.FadeColor, 0.0f, tacticsUnitControllerArray2 == null ? (TacticsUnitController[])null : tacticsUnitControllerArray2, tacticsUnitControllerArray1 == null ? (TacticsUnitController[])null : tacticsUnitControllerArray1);
     }
 }