private void Awake() { New_glitch = GetComponent <Glitch>(); New_RGBSplit = GetComponent <RGBSplit>(); //New_Frost = GetComponent<Frost>(); frameRate = new WaitForSeconds(1 / _frameRate); DangerZone.TriggerEnterOn += ADD_Effect; DangerZone.TriggerEnterOff += Off_Effect; }
// Use this for initialization void Start() { postProcessProfile = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <PostProcessingBehaviour>().profile; bloom = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Bloom>(); distorsion = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <LensDistortionBlur>(); rgbSplit = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <RGBSplit>(); slowMoVignetting = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <ContrastVignette>(); bcgScript = FindObjectOfType <BrightnessContrastGamma>(); slowmoScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <SlowMotionCamera>(); browianMotion = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <BrownianMotion>(); //Video brightnessSlider.onValueChanged.AddListener(Brightness); contrastSlider.onValueChanged.AddListener(Contrast); gammaSlider.onValueChanged.AddListener(Gamma); //Advanced antialiasingSlider.onValueChanged.AddListener(AntiAliasing); bloomSlider.onValueChanged.AddListener(Bloom); shadowsSlider.onValueChanged.AddListener(Shadows); ambiantOcclusionToggle.onValueChanged.AddListener((bool arg0) => { postProcessProfile.ambientOcclusion.enabled = arg0; EnableApplyButton(); }); blurToggle.onValueChanged.AddListener((bool arg0) => { postProcessProfile.motionBlur.enabled = arg0; EnableApplyButton(); }); grainToggle.onValueChanged.AddListener((bool arg0) => { postProcessProfile.grain.enabled = arg0; EnableApplyButton(); }); vignettingToggle.onValueChanged.AddListener((bool arg0) => { postProcessProfile.vignette.enabled = arg0; EnableApplyButton(); }); cameraMotionToggle.onValueChanged.AddListener((bool arg0) => { browianMotion.enabled = arg0; browianMotionEnabled = arg0; if (!arg0 && MenuManager.Instance.currentMenu != null) { GlobalVariables.Instance.menuCameraMovement.MenuPositionGraphics(); } if (arg0) { GlobalVariables.Instance.menuCameraMovement.EnableBrowianMotion(); } EnableApplyButton(); }); rgbToggle.onValueChanged.AddListener((bool arg0) => { rgbSplit.enabled = arg0; EnableApplyButton(); }); distorsionToggle.onValueChanged.AddListener((bool arg0) => { distorsion.enabled = arg0; EnableApplyButton(); }); slowMoVignettingToggle.onValueChanged.AddListener((bool arg0) => { slowMoVignetting.enabled = arg0; EnableApplyButton(); }); if (PlayerPrefs.HasKey("QualityLevel")) { LoadData(); } else { Reset(); ResetAdvanced(); } SaveData(); applyButton.SetActive(false); apply = true; }
private void Start() { cameraObject = GetComponent <Camera>(); rgbSplit = GetComponent <RGBSplit>(); }