IEnumerator StartTheFirstAbility() { freeze = true; Drone_First_Ability_Liban F2367 = GameObject.Find("Activate Drone first ability").GetComponent <Drone_First_Ability_Liban>(); F2367.enabled = true; ActivateWatchAbility ERT = GameObject.Find("Activate the watch ability").GetComponent <ActivateWatchAbility>(); ERT.enabled = false; Drone_Second_ability_Liban SECSEC = GameObject.Find("Activate Drone second ability").GetComponent <Drone_Second_ability_Liban>(); SECSEC.enabled = false; EnemyFrozenText.gameObject.SetActive(true); TheAmazingDrone.GetComponent <BoxCollider>().enabled = true; TheAmazingDrone.GetComponent <BoxCollider>().size = new Vector3(SizeX, SizeY, SizeZ); yield return(new WaitForSeconds(10.0f)); freeze = false; ActivateWatchAbility TYU = GameObject.Find("Activate the watch ability").GetComponent <ActivateWatchAbility>(); TYU.enabled = true; TheAmazingDrone.GetComponent <BoxCollider>().size = new Vector3(OriginalSizeX, OriginalSizeY, OriginalSizeZ); EnemyFrozenText.gameObject.SetActive(false); DAENEMY1.GetComponent <Rigidbody>().constraints = RigidbodyConstraints.None; DAENEMY2.GetComponent <Rigidbody>().constraints = RigidbodyConstraints.None; Drone_Second_ability_Liban RTY = GameObject.Find("Activate Drone second ability").GetComponent <Drone_Second_ability_Liban>(); RTY.enabled = true; yield return(new WaitForSeconds(5.5f)); Drone_First_Ability_Liban PDFG = GameObject.Find("Activate Drone first ability").GetComponent <Drone_First_Ability_Liban>(); PDFG.enabled = true; }
// 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; } }