// 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; } }
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; }
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 Launch() { Ray camRay = Camyeahyeah.ScreenPointToRay(Input.mousePosition); RaycastHit Hit; if (Physics.Raycast(camRay, out Hit, 100f, Layer)) { cursor.transform.position = Hit.point + Vector3.up * 0.5f; Vector3 Vo = CalculateVelocity(Hit.point, shootingpoint.position, 2.2f); Visualize(Vo); // transform.rotation = Quaternion.LookRotation(Vo); if (Input.GetMouseButtonUp(0) && readyToThrowyeah && grenadeamountCounter > 0) { Rigidbody obj = Instantiate(bulletPrefabs, shootingpoint.position, shootingpoint.rotation); obj.velocity = Vo; readyToThrowyeah = false; TheTimer = Time.timeSinceLevelLoad + 11.0f; Grenade_Timer_Text_Liban GT_Timer3 = GameObject.Find("Grenade Timer Text").GetComponent <Grenade_Timer_Text_Liban>(); GT_Timer3.GrenadeTimerTimer = 11.0f; TrajectoryGroundCursor.gameObject.SetActive(false); TheTrajectoryCamera.gameObject.SetActive(false); TheTrajectoryCamera.transform.position = WhereTheCameraWillSpawn.position; TheThirdPErsonCamera.gameObject.SetActive(true); FP_RigidB.gameObject.SetActive(true); GrenadeText.gameObject.SetActive(false); TheCursorScript.gameObject.SetActive(false); cursor.gameObject.SetActive(false); CountdownSoundEffect.Stop(); LineRenderer LR = GameObject.Find("Character").GetComponent <LineRenderer>(); LR.enabled = false; ActivateWatchAbilityTwo_Liban TREW2 = GameObject.Find("Activate second watch ability").GetComponent <ActivateWatchAbilityTwo_Liban>(); TREW2.enabled = true; TheCursorScript.gameObject.SetActive(false); cursor.gameObject.SetActive(false); Stun_Light_Liban STRE67 = GameObject.FindWithTag("FlashLight").GetComponent <Stun_Light_Liban>(); STRE67.enabled = false; } if (Input.GetMouseButtonUp(1) && readyToThrowyeah && grenadeamountCounter > 0) { Rigidbody obj2 = Instantiate(secondBulletPrefabs, shootingpoint.position, shootingpoint.rotation); obj2.velocity = Vo; readyToThrowyeah = false; TheTimer = Time.timeSinceLevelLoad + 11.0f; Grenade_Timer_Text_Liban GT_Timer3 = GameObject.Find("Grenade Timer Text").GetComponent <Grenade_Timer_Text_Liban>(); GT_Timer3.GrenadeTimerTimer = 11.0f; TrajectoryGroundCursor.gameObject.SetActive(false); TheTrajectoryCamera.gameObject.SetActive(false); TheTrajectoryCamera.transform.position = WhereTheCameraWillSpawn.position; TheThirdPErsonCamera.gameObject.SetActive(true); FP_RigidB.gameObject.SetActive(true); GrenadeText.gameObject.SetActive(false); CountdownSoundEffect.Stop(); // Light_Hold_Blue GF = GameObject.FindWithTag("FlashLight").GetComponent<Light_Hold_Blue>(); // GF.TorchLightBlue.gameObject.SetActive(true); LineRenderer LR = GameObject.Find("Character").GetComponent <LineRenderer>(); LR.enabled = false; ActivateWatchAbilityTwo_Liban TREW2 = GameObject.Find("Activate second watch ability").GetComponent <ActivateWatchAbilityTwo_Liban>(); TREW2.enabled = true; TheCursorScript.gameObject.SetActive(false); Stun_Light_Liban STRE67 = GameObject.FindWithTag("FlashLight").GetComponent <Stun_Light_Liban>(); STRE67.enabled = false; } } }