Esempio n. 1
0
 public void Flash()
 {
     if (useGlare)
     {
         if (glare == null)
         {
             glare = this.gameObject.AddComponent <GlareEffect>();
         }
         if (!glare.isInitialized)
         {
             glare.Init(BloomIntensity, Color.white);
         }
         glare.StartFlashReturn(flashLength);
     }
     if (useChroma)
     {
         if (ChromaticAberr == null)
         {
             ChromaticAberr = this.gameObject.AddComponent <ChromaticAbrevEffect>();
         }
         if (!ChromaticAberr.isInitialized)
         {
             ChromaticAberr.Init(ChromaticIntensity);
         }
         ChromaticAberr.StartFlashReturn(flashLength);
     }
 }
Esempio n. 2
0
 public void EndFlash()
 {
     if (glare != null)
     {
         glare.TurnOff(flashLength * 2f);
     }
     if (ChromaticAberr != null)
     {
         ChromaticAberr.TurnOff(flashLength * 2f);
     }
     glare          = null;
     ChromaticAberr = null;
 }
Esempio n. 3
0
 public void Flash()
 {
     if (glare == null)
     {
         glare = this.gameObject.AddComponent <GlareEffect>();
         glare.Init(BloomIntensity);
     }
     if (ChromaticAberr == null)
     {
         ChromaticAberr = this.gameObject.AddComponent <ChromaticAbrevEffect>();
         ChromaticAberr.Init(ChromaticIntensity);
     }
 }
Esempio n. 4
0
 public void StartFlash()
 {
     if (glare == null)
     {
         glare = this.gameObject.AddComponent <GlareEffect>();
         glare.Init(BloomIntensity, Color.white);
     }
     if (ChromaticAberr == null)
     {
         ChromaticAberr = this.gameObject.AddComponent <ChromaticAbrevEffect>();
         ChromaticAberr.Init(ChromaticIntensity);
     }
     glare.TurnOn(flashLength);
     ChromaticAberr.TurnOn(flashLength);
 }