IEnumerator TURNIT()

    {
        TrajectoryCAM.transform.parent = null;



        TrajectoryCAM.gameObject.SetActive(true);



        ThirdCam.gameObject.SetActive(false);



        CursorScript.gameObject.SetActive(true);



        RBFPS.gameObject.SetActive(false);



        TrajectCursor.gameObject.SetActive(true);



        CountdownSoundEffect.Play();


        GRText.gameObject.SetActive(true);



        Projectile_Donut GalacticDonut = GameObject.Find("Character").GetComponent <Projectile_Donut>();



        GalacticDonut.enabled = true;



        print("LOOOOOL yoyoyoyoo OH MYYYY");



        LineRenderer LR4 = GameObject.Find("Character").GetComponent <LineRenderer>();


        LR4.enabled = true;



        Activate_Trajectory_TurnUP_Liban HKJLG = GameObject.FindWithTag("ACTGRE").GetComponent <Activate_Trajectory_TurnUP_Liban>();

        HKJLG.enabled = false;



        Grenade_Timer_Text_Liban GT_Timer = GameObject.Find("Grenade Timer Text").GetComponent <Grenade_Timer_Text_Liban>();



        GT_Timer.enabled = true;



        yield return(new WaitForSeconds(10.1f));



        Projectile_Donut GalacticDonut22 = GameObject.Find("Character").GetComponent <Projectile_Donut>();


        GalacticDonut22.enabled = false;



        Torchyh.SetActive(true);


        // Grenade_Timer_Text_Liban GT_Timer3 = GameObject.Find("Grenade Timer Text").GetComponent<Grenade_Timer_Text_Liban>();


        // GT_Timer3.GrenadeTimerTimer = 10.0f;



        CountdownSoundEffect.Stop();



        TrajectCursor.gameObject.SetActive(false);



        TrajectoryCAM.gameObject.SetActive(false);



        TrajectoryCAM.transform.position = WhereTheCamWillSpawn.position;



        ThirdCam.gameObject.SetActive(true);



        RBFPS.gameObject.SetActive(true);


        GRText.gameObject.SetActive(false);



        //  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;



        yield return(new WaitForSeconds(6.0f));



        TrajectoryCAM.transform.SetParent(OGPlayer);


        TrajectoryCAM.transform.position = WhereTheCamWillSpawn.transform.position;



        TrajectoryCAM.transform.rotation = WhereTheCamWillSpawn.transform.rotation;



        Activate_Trajectory_TurnUP_Liban ATURHN3 = GameObject.FindWithTag("ACTGRE").GetComponent <Activate_Trajectory_TurnUP_Liban>();


        ATURHN3.enabled = true;
    }
Esempio n. 2
0
    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;
            }
        }
    }