Ejemplo n.º 1
0
        public void Awake()
        {
            // Ensure directional light reference is not null
            if (_directionalLight == null)
            {
                Debug.LogError(string.Format("({0}) Directional Light reference not set, or null"));
            }
            else if (_directionalLight.type != LightType.Directional)
            {
                // Notify user if given directional light reference, is not a directional light
                Debug.LogWarning(string.Format("({0}) Directional Light reference set to light which is not a directional light"));
            }

            // Ensure player camera reference is not null
            if (_playerCamera == null)
            {
                Debug.LogError(string.Format("({0}) Player Camera reference not set, or null"));
            }
            else
            {
                // Get Bloom Optimized component on player camera
                _playerBloom = _playerCamera.GetComponent<BloomOptimized>();

                if (_playerBloom == null)
                {
                    // Unable to find component on player camera,
                    // attach new Bloom Optimized component to player camera, and log it
                    _playerBloom = _playerCamera.gameObject.AddComponent<BloomOptimized>();

                    Debug.LogWarning(string.Format("({0}) Unable to find Bloom Optimized Component on player camera, creating...",
                        this.name));
                }
            }
        }
Ejemplo n.º 2
0
    // Use this for initialization
    void Awake()
    {
        bloom      = Camera.main.GetComponent <UnityStandardAssets.ImageEffects.BloomOptimized>();
        aberration = Camera.main.GetComponent <UnityStandardAssets.ImageEffects.VignetteAndChromaticAberration>();

        press = false;
    }
Ejemplo n.º 3
0
 private void Awake()
 {
     Bloom_   = FindObjectOfType <BloomOptimized>();
     Fish_eye = FindObjectOfType <Fisheye>();
     VACA     = FindObjectOfType <VignetteAndChromaticAberration>();
     //if(test)
     //    PlayerPrefs.SetInt("GalleryProgress", 0);
     //print(PlayerPrefs.GetInt("GalleryProgress"));
 }
Ejemplo n.º 4
0
 public void Clone(BloomOptimized src)
 {
     threshold      = src.threshold;
     intensity      = src.intensity;
     blurSize       = src.blurSize;
     resolution     = src.resolution;
     blurIterations = src.blurIterations;
     blurType       = src.blurType;
 }
Ejemplo n.º 5
0
    void Start()
    {
        //set up object and script references
        SunShaftsComponent             = MainCamera.GetComponent <UnityStandardAssets.ImageEffects.SunShafts>();
        ColorCorrectionCurvesComponent = MainCamera.GetComponent <UnityStandardAssets.ImageEffects.ColorCorrectionCurves>();
        BloomOptimizedComponent        = MainCamera.GetComponent <UnityStandardAssets.ImageEffects.BloomOptimized>();
//		ChromaticAberrationComponent = MainCamera.GetComponent<UnityStandardAssets.ImageEffects.VignetteAndChromaticAberration>();
//		AntiAliasingComponent = MainCamera.GetComponent<UnityStandardAssets.ImageEffects.Antialiasing>();
        WeaponBehaviorComponents = WeaponObj.GetComponentsInChildren <WeaponBehavior>(true);
        FPSPlayerComponent       = MainCamera.GetComponent <CameraControl>().FPSPlayerComponent;
    }
Ejemplo n.º 6
0
 static public int get_blurType(IntPtr l)
 {
     try {
         UnityStandardAssets.ImageEffects.BloomOptimized self = (UnityStandardAssets.ImageEffects.BloomOptimized)checkSelf(l);
         pushEnum(l, (int)self.blurType);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 7
0
 static public int get_intensity(IntPtr l)
 {
     try {
         UnityStandardAssets.ImageEffects.BloomOptimized self = (UnityStandardAssets.ImageEffects.BloomOptimized)checkSelf(l);
         pushValue(l, self.intensity);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 8
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityStandardAssets.ImageEffects.BloomOptimized o;
         o = new UnityStandardAssets.ImageEffects.BloomOptimized();
         pushValue(l, o);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 9
0
 static public int CheckResources(IntPtr l)
 {
     try {
         UnityStandardAssets.ImageEffects.BloomOptimized self = (UnityStandardAssets.ImageEffects.BloomOptimized)checkSelf(l);
         var ret = self.CheckResources();
         pushValue(l, ret);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 10
0
 static public int set_intensity(IntPtr l)
 {
     try {
         UnityStandardAssets.ImageEffects.BloomOptimized self = (UnityStandardAssets.ImageEffects.BloomOptimized)checkSelf(l);
         System.Single v;
         checkType(l, 2, out v);
         self.intensity = v;
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 11
0
 static public int Copy(IntPtr l)
 {
     try {
         UnityStandardAssets.ImageEffects.BloomOptimized self = (UnityStandardAssets.ImageEffects.BloomOptimized)checkSelf(l);
         UnityStandardAssets.ImageEffects.BloomOptimized a1;
         checkType(l, 2, out a1);
         self.Copy(a1);
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 12
0
 static public int set_fastBloomShader(IntPtr l)
 {
     try {
         UnityStandardAssets.ImageEffects.BloomOptimized self = (UnityStandardAssets.ImageEffects.BloomOptimized)checkSelf(l);
         UnityEngine.Shader v;
         checkType(l, 2, out v);
         self.fastBloomShader = v;
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 13
0
 static public int set_blurType(IntPtr l)
 {
     try {
         UnityStandardAssets.ImageEffects.BloomOptimized          self = (UnityStandardAssets.ImageEffects.BloomOptimized)checkSelf(l);
         UnityStandardAssets.ImageEffects.BloomOptimized.BlurType v;
         checkEnum(l, 2, out v);
         self.blurType = v;
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 14
0
 static public int set_blurIterations(IntPtr l)
 {
     try {
         UnityStandardAssets.ImageEffects.BloomOptimized self = (UnityStandardAssets.ImageEffects.BloomOptimized)checkSelf(l);
         System.Int32 v;
         checkType(l, 2, out v);
         self.blurIterations = v;
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 15
0
		// Use this for initialization
		void Start () {
			bloom = this.GetComponent<BloomOptimized> ();
			vignette = this.GetComponent<VignetteAndChromaticAberration> ();
			audioSource = this.GetComponent<AudioSource>();
		
			Hashtable ht = new Hashtable ();
			ht.Add ("from", 2.5);
			ht.Add ("to", bloom.intensity);
			ht.Add ("time", 3);
			ht.Add ("onupdate", "OnBloomUpdate");
			iTween.ValueTo (gameObject, ht);

			onTalkEnded = new TalkEventManager.TalkEvent (OnTalkEnded);
			TalkEventManager.TalkEnded += onTalkEnded;
		}
Ejemplo n.º 16
0
    void Awake()
    {
        //needed to "get" values from Stat when game begins
        meter1.Initialize();
        meter2.Initialize();
        meter3.Initialize();
        meter4.Initialize();
        meter5.Initialize();
        meter6.Initialize();

        //gets components
        colorChange = Camera.main.GetComponent <ColorCurvesManager> ();
        bloom       = Camera.main.GetComponent <UnityStandardAssets.ImageEffects.BloomOptimized>();
        aberration  = Camera.main.GetComponent <UnityStandardAssets.ImageEffects.VignetteAndChromaticAberration>();
        colorcurves = Camera.main.GetComponent <UnityStandardAssets.ImageEffects.ColorCorrectionCurves>();
    }
Ejemplo n.º 17
0
    public IEnumerator SentenceAnim()
    {
        yield return(new WaitForSeconds(1f));

        sentence.DOFade(1, 4f).SetEase(Ease.Linear);
        sentence.transform.DOScale(1.15f, 8f);

        //Fade Effects
        LensDistortionBlur disto = sentenceCamera.GetComponent <LensDistortionBlur>();

        DOTween.To(() => disto.Distortion, x => disto.Distortion = x, 0.7f, 4);

        AnalogTV tv = sentenceCamera.GetComponent <AnalogTV>();

        DOTween.To(() => tv.Distortion, x => tv.Distortion = x, -0.5f, 4);

        UnityStandardAssets.ImageEffects.BloomOptimized bloom = sentenceCamera.GetComponent <UnityStandardAssets.ImageEffects.BloomOptimized>();
        DOTween.To(() => bloom.intensity, x => bloom.intensity = x, 1f, 3);

        yield return(new WaitForSeconds(textDuration));

        DOTween.To(() => disto.Distortion, x => disto.Distortion = x, 0f, 4);

        //End
        sentence.DOFade(0, 1f);

        Led led = sentenceCamera.GetComponent <Led>();

        DOTween.To(() => led.Scale, x => led.Scale = x, 5, 1);

        sentenceCamera.GetComponent <Glitch>().enabled = true;
        SFX_Glitch.Play();

        yield return(new WaitForSeconds(1));

        inGameCanvas.SetActive(true);
        sentenceCamera.SetActive(false);
        background.DOFade(0, 3f);
        crosshairAlpha.DOFade(1, 3f);
        player.enabled = true;
    }
Ejemplo n.º 18
0
 public void Copy(BloomOptimized src)
 {
     this.Clone(src);
 }