public void CreateFilmEffector(int effecttype, Color targetColor, int targetpower, int style, float length, bool isBlocking)
        {
            effectCamera.GetComponent <Camera>().enabled = true;
            FilmEffector filmEffector = effectCamera.AddComponent <FilmEffector>();

            filmEffector.Prepare(effecttype, targetColor, targetpower, style, length, isBlocking);
        }
Example #2
0
 public void CreateBlur(int targetpower, float length, bool isBlocking)
 {
     useBlur   = true;
     filmPower = targetpower;
     if (effector != null)
     {
         HideFilmEffector(length, isBlocking: false);
         effector = null;
     }
     gameSystem.RegisterAction(delegate
     {
         EffectCamera.GetComponent <Camera>().enabled = true;
         effector = EffectCamera.AddComponent <FilmEffector>();
         effector.Prepare(12, Color.white, targetpower, 0, length, isBlocking);
     });
 }
Example #3
0
 public void CreateFilmEffector(int effecttype, Color targetColor, int targetpower, int style, float length, bool isBlocking)
 {
     useFilm   = true;
     filmPower = targetpower;
     filmColor = targetColor;
     filmType  = effecttype;
     filmStyle = style;
     gameSystem.RegisterAction(delegate
     {
         EffectCamera.GetComponent <Camera>().enabled = true;
         if (effector == null)
         {
             effector = EffectCamera.AddComponent <FilmEffector>();
         }
         effector.Prepare(effecttype, targetColor, targetpower, style, length, isBlocking);
     });
 }
Example #4
0
 public void HideFilmEffector(float time, bool isBlocking)
 {
     useFilm           = false;
     useBlur           = false;
     useHorizontalBlur = false;
     if (!(effector == null))
     {
         FilmEffector targeteffector = effector;
         if (Mathf.Approximately(time, 0f))
         {
             targeteffector.RemoveEffector();
         }
         else
         {
             gameSystem.RegisterAction(delegate
             {
                 targeteffector.FadeOut(time, isBlocking);
             });
         }
         effector = null;
     }
 }
        public void HideFilmEffector(float time, bool isBlocking)
        {
            FilmEffector component = effectCamera.GetComponent <FilmEffector>();

            component.FadeOut(time, isBlocking);
        }