// 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 SphereCollider ColliderForSecondAbility; // public SphereCollider ColliderForFirstAbility; void Update() { if (Input.GetMouseButtonDown(1)) { StartCoroutine(ActivateExposeLocationss()); print("juio"); } IEnumerator ActivateExposeLocationss() { expose = true; Drone_Second_ability_Liban XCV = GameObject.Find("Activate Drone second ability").GetComponent <Drone_Second_ability_Liban>(); XCV.enabled = true; ActivateWatchAbilityTwo_Liban AWQ123 = GameObject.Find("Activate second watch ability").GetComponent <ActivateWatchAbilityTwo_Liban>(); AWQ123.enabled = false; AmazingDrone.GetComponent <SphereCollider>().radius = 8499; AmazingDrone.GetComponent <SphereCollider>().enabled = true; AmazingDrone.GetComponent <BoxCollider>().enabled = false; Drone_Exposing_Enemies_Liban EXXXLiban = GameObject.Find("Drone Skin").GetComponent <Drone_Exposing_Enemies_Liban>(); EXXXLiban.enabled = true; //Nil_FOVdetection.droneIntel = true; //cancels out ability yield return(new WaitForSeconds(5.0f)); expose = false; // Outline O12 = GameObject.Find("enemy sphere 2").GetComponent<Outline>(); // O12.enabled = false; // Outline O13 = GameObject.Find("enemy sphere 3").GetComponent<Outline>(); // O13.enabled = false; // Outline O14 = GameObject.Find("enemy sphere 4").GetComponent<Outline>(); // O14.enabled = false; // AmazingDrone.GetComponent<SphereCollider>().radius = 521.5f; // AmazingDrone.GetComponent<SphereCollider>().enabled = false; //Nil_FOVdetection.droneIntel = false; yield return(new WaitForSeconds(5.7f)); ActivateWatchAbilityTwo_Liban TGB = GameObject.Find("Activate second watch ability").GetComponent <ActivateWatchAbilityTwo_Liban>(); TGB.enabled = true; } }
IEnumerator ActivateTheGHOSTSSS() { TheWatchYEAHYEAH.GetComponent <MeshRenderer>().enabled = false; TheWatchYEAHYEAH.GetComponent <BoxCollider>().enabled = false; TheeeePlayer.GetComponent <MeshRenderer>().material = Ghoooooost; YoFace.GetComponent <MeshRenderer>().material = Ghoooooost; ActivateWatchAbilityTwo_Liban GHTY = GameObject.Find("Activate second watch ability").GetComponent <ActivateWatchAbilityTwo_Liban>(); GHTY.enabled = false; //Stun_Light_Liban STYP123 = GameObject.FindWithTag("FlashLight").GetComponent<Stun_Light_Liban>(); //STYP123.enabled = false; //ActivateWatchAbility TYUI = GameObject.Find("Activate the watch ability").GetComponent<ActivateWatchAbility>(); //TYUI.enabled = false; yield return(new WaitForSeconds(5.0f)); TheeeePlayer.GetComponent <MeshRenderer>().material = Normallll; YoFace.GetComponent <MeshRenderer>().material = Normallll; Nil_FOVdetection.phantasm = false; yield return(new WaitForSeconds(6.0f)); TheWatchYEAHYEAH.GetComponent <MeshRenderer>().enabled = true; TheWatchYEAHYEAH.GetComponent <BoxCollider>().enabled = true; ActivateWatchAbilityTwo_Liban AVWA2 = GameObject.Find("Activate second watch ability").GetComponent <ActivateWatchAbilityTwo_Liban>(); AVWA2.enabled = true; ActivateWatchAbility POIU = GameObject.Find("Activate the watch ability").GetComponent <ActivateWatchAbility>(); POIU.enabled = true; GetComponent <ActivateWatchAbilityTwo_Liban>().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; } } }