// Update is called once per frame void Update() { if (Input.GetMouseButtonDown(1)) { isZoomed = !isZoomed; } if (isZoomed) { GetComponent <Camera>().fieldOfView = Mathf.Lerp(GetComponent <Camera>().fieldOfView, Zoom, Time.deltaTime * SmoothYeah); DeferredNightVisionEffect NightVisionYeah2 = GameObject.FindWithTag("LemarCamera").GetComponent <DeferredNightVisionEffect>(); NightVisionYeah2.enabled = false; GameObject[] da_troch = GameObject.FindGameObjectsWithTag("FlashLight"); foreach (GameObject gos in da_troch) { gos.GetComponent <Stun_Light_Liban>().enabled = false; gos.GetComponent <Light_Hold_Blue>().enabled = false; } New_Motion_XBlur BlurrYEAHYEAHH7 = GameObject.Find("Character").GetComponent <New_Motion_XBlur>(); BlurrYEAHYEAHH7.enabled = false; } else { GetComponent <Camera>().fieldOfView = Mathf.Lerp(GetComponent <Camera>().fieldOfView, Normal, Time.deltaTime * SmoothYeah); ZoomInSoundYeahYeah.Play(); // New_Motion_XBlur BlurrYEAHYEAHH7 = GameObject.FindWithTag("Player").GetComponent<New_Motion_XBlur>(); // BlurrYEAHYEAHH7.enabled = true; } }
// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.O)) { isNightVisionYeah = !isNightVisionYeah; } if (isNightVisionYeah) { DeferredNightVisionEffect NightVisionYeah = GameObject.Find("FPSMainCamera").GetComponent <DeferredNightVisionEffect>(); NightVisionYeah.enabled = true; New_Motion_XBlur BlurrYEAHYEAHH = GameObject.Find("Playerlemar").GetComponent <New_Motion_XBlur>(); BlurrYEAHYEAHH.enabled = false; ThePlayer.GetComponent <AudioSource>().minDistance = 10.0f; print("IT IS WORKING yeahyeah"); } else { DeferredNightVisionEffect NightVisionYeah = GameObject.Find("FPSMainCamera").GetComponent <DeferredNightVisionEffect>(); NightVisionYeah.enabled = false; NightVisionActivationAudio.Play(); ThePlayer.GetComponent <AudioSource>().minDistance = 1.05f; New_Motion_XBlur BlurrYEAHYEAHH = GameObject.Find("Playerlemar").GetComponent <New_Motion_XBlur>(); BlurrYEAHYEAHH.enabled = true; print("IT IS WORKING yeahyeah223"); } }
void RightCLick() { if (Input.GetMouseButtonDown(1)) { isZoomInYeah2 = !isZoomInYeah2; } if (isZoomInYeah2) { GetComponent <Camera>().fieldOfView = Mathf.Lerp(GetComponent <Camera>().fieldOfView, Zoom, Time.deltaTime * smooth); DeferredNightVisionEffect NightVisionYeah = GameObject.FindWithTag("LemarCamera").GetComponent <DeferredNightVisionEffect>(); NightVisionYeah.enabled = false; print("LETS GO!"); New_Motion_XBlur BlurrYEAHYEAHH = GameObject.Find("Character").GetComponent <New_Motion_XBlur>(); BlurrYEAHYEAHH.enabled = true; } else { GetComponent <Camera>().fieldOfView = Mathf.Lerp(GetComponent <Camera>().fieldOfView, Back, Time.deltaTime * smooth); New_Motion_XBlur BlurrYEAHYEAHH = GameObject.Find("Character").GetComponent <New_Motion_XBlur>(); BlurrYEAHYEAHH.enabled = false; } }
void LeftClick() { if (Input.GetMouseButtonDown(0)) { isNightVisionYeah = !isNightVisionYeah; } if (isNightVisionYeah) { DeferredNightVisionEffect NightVisionYeah = GameObject.FindWithTag("LemarCamera").GetComponent <DeferredNightVisionEffect>(); NightVisionYeah.enabled = true; New_Motion_XBlur BlurrYEAHYEAHH = GameObject.Find("Character").GetComponent <New_Motion_XBlur>(); BlurrYEAHYEAHH.enabled = false; ThePlayer.GetComponent <AudioSource>().minDistance = 10.0f; print("IT IS WORKING yeahyeah"); Light_Hold_Blue LLLBLUE = GameObject.Find("FlashLight").GetComponent <Light_Hold_Blue>(); LLLBLUE.enabled = false; // CameraSwitch switcham = GameObject.Find("camera switch script empty object new").GetComponent<CameraSwitch>(); // switcham.enabled = false; } else { // DeferredNightVisionEffect NightVisionYeah = GameObject.FindWithTag("LemarCamera").GetComponent<DeferredNightVisionEffect>(); // NightVisionYeah.enabled = false; // New_Motion_XBlur BlurrYEAHYEAHH = GameObject.Find("Character").GetComponent<New_Motion_XBlur>(); // BlurrYEAHYEAHH.enabled = true; print("IT IS WORKING yeahyeah223"); NightVisionActivationAudio.Play(); ThePlayer.GetComponent <AudioSource>().minDistance = 1.05f; // print("IT IS WORKING yeahyeah223"); Light_Hold_Blue LLLBLUE = GameObject.FindWithTag("FlashLight").GetComponent <Light_Hold_Blue>(); LLLBLUE.enabled = false; // Battery_Level batteryyeahyeah = GameObject.FindWithTag("FlashLight").GetComponent<Battery_Level>(); // batteryyeahyeah.enabled = false; } }
// Update is called once per frame void Update() { if (Input.GetMouseButtonDown(0)) { SwitchYeah = !SwitchYeah; } if (SwitchYeah) { FirstPersonCamera.gameObject.SetActive(true); OriginalCamera.gameObject.SetActive(false); DeferredNightVisionEffect NightVisionYeah = GameObject.FindWithTag("LemarCamera").GetComponent <DeferredNightVisionEffect>(); NightVisionYeah.enabled = true; GameObject[] da_troch3 = GameObject.FindGameObjectsWithTag("FlashLight"); foreach (GameObject gos in da_troch3) { gos.GetComponent <Stun_Light_Liban>().enabled = false; gos.GetComponent <Light_Hold_Blue>().enabled = false; } New_Motion_XBlur BlurrYEAHYEAHH = GameObject.Find("Character").GetComponent <New_Motion_XBlur>(); BlurrYEAHYEAHH.enabled = true; CameraZoom Zoomy = GameObject.Find("FPSMainCamera").GetComponent <CameraZoom>(); Zoomy.enabled = true; } else { print("ghgh"); OriginalCamera.gameObject.SetActive(true); FirstPersonCamera.gameObject.SetActive(false); DeferredNightVisionEffect NightVisionYeah = GameObject.FindWithTag("LemarCamera").GetComponent <DeferredNightVisionEffect>(); NightVisionYeah.enabled = false; Light_Hold_Blue LLBLUE = GameObject.FindWithTag("FlashLight").GetComponent <Light_Hold_Blue>(); LLBLUE.enabled = false; } }