void RunOut() { TorchLightBlue.gameObject.SetActive(false); Light_Hold_Blue LLLIGHTHOLDblue = GameObject.FindWithTag("FlashLight").GetComponent <Light_Hold_Blue>(); LLLIGHTHOLDblue.enabled = false; Stun_Light_Liban SLYellow = GameObject.FindWithTag("FlashLight").GetComponent <Stun_Light_Liban>(); SLYellow.enabled = false; StunLightYellow.gameObject.SetActive(false); CurrentBattery = 0; }
// public GameObject FakePlayer; // public Transform ThePlayer; // public Transform Face; // public Transform CloningPoint1; // public Transform CloningPoint2; // public Transform CloningPoint3; // public GameObject Watchyeah; // public ParticleSystem Smoke; // public Material Ghost; // public Material Normal; void OnTriggerEnter(Collider other) { if (other.CompareTag("Player")) { ActivateWatchAbility AAW = GameObject.Find("Activate the watch ability").GetComponent <ActivateWatchAbility>(); AAW.enabled = true; print("calmmmm"); Light_Hold_Blue LHBY = GameObject.FindWithTag("FlashLight").GetComponent <Light_Hold_Blue>(); LHBY.enabled = false; ActivateWatchAbilityTwo_Liban LYPTO = GameObject.Find("Activate second watch ability").GetComponent <ActivateWatchAbilityTwo_Liban>(); LYPTO.enabled = true; Stun_Light_Liban STGH = GameObject.FindWithTag("FlashLight").GetComponent <Stun_Light_Liban>(); STGH.enabled = false; } }
public void TakeSomeBatteryBlue(int BlueAmount) { CurrentBattery -= BlueAmount; BatterySlider.value = CurrentBattery; if (CurrentBattery <= 0) { RunOut(); } if (CurrentBattery > 1) { Revive(); Light_Hold_Blue LIGHTHOLDBLUE = GameObject.FindWithTag("FlashLight").GetComponent <Light_Hold_Blue>(); LIGHTHOLDBLUE.enabled = true; } if (CurrentBattery < 450) { DangerTextyeahyeah.gameObject.SetActive(true); LowBatterySoudEffect.Play(); LowBatterySoudEffect.loop = true; } if (CurrentBattery >= 456) { DangerTextyeahyeah.gameObject.SetActive(false); } }
void Revive() { // TorchLightBlue.gameObject.SetActive(true); // Battery_Level ThisScrtipt = GameObject.FindWithTag("FlashLight").GetComponent<Battery_Level>(); // ThisScrtipt.enabled = true; Light_Hold_Blue LIGHTHOLDBLUE = GameObject.FindWithTag("FlashLight").GetComponent <Light_Hold_Blue>(); LIGHTHOLDBLUE.enabled = true; Stun_Light_Liban Yellowwww = GameObject.FindWithTag("FlashLight").GetComponent <Stun_Light_Liban>(); Yellowwww.enabled = true; }
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; } }