void TakeBattery() { DroneBatteryTimer -= Time.deltaTime; if (Time.deltaTime >= DroneBatteryTimer) { CurrentDroneHealth -= DroneBatteryDraineryh; DroneHealthBar.value = CurrentDroneHealth; } if (CurrentDroneHealth <= 0) { DeathDeath(); LemarCamera LMKJH = GameObject.Find("Main Camera").GetComponent <LemarCamera>(); LMKJH.RotateSpeed = 10; LemarMovment TYU4567 = GameObject.Find("FinalPlayer").GetComponent <LemarMovment>(); TYU4567.enabled = true; DaTorch.SetActive(true); } }
// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.P)) { isThePauseMenuOn = !isThePauseMenuOn; } if (isThePauseMenuOn) { PauseMenuu.SetActive(true); Time.timeScale = 0; LemarCamera HJUYP = GameObject.FindWithTag("MainCamera").GetComponent <LemarCamera>(); HJUYP.RotateSpeed = 0; } else { PauseMenuu.SetActive(false); Time.timeScale = 1; LemarCamera HJUPYT = GameObject.FindWithTag("MainCamera").GetComponent <LemarCamera>(); HJUPYT.RotateSpeed = 10; } }
void YeahChangeCam() { if (Input.GetKeyDown(KeyCode.Q)) { //Torch.SetActive(false); DaDrone.SetActive(true); Final_Drone_Movement_Liban FDM45 = GameObject.Find("Drone Skin").GetComponent <Final_Drone_Movement_Liban>(); FDM45.enabled = true; DaDrone.transform.position = WhereTheDroneWillSpawn.transform.position; DroneCamera.gameObject.SetActive(true); LemarMovment LMovementyh = GameObject.Find("FinalPlayer").GetComponent <LemarMovment>(); LMovementyh.enabled = false; DroneCameraLIVE.gameObject.SetActive(true); LemarCamera LCAM = GameObject.Find("Main Camera").GetComponent <LemarCamera>(); LCAM.RotateSpeed = 0f; Final_First_Ability_Drone_Liban ASW = GameObject.Find("Activate Drone first ability").GetComponent <Final_First_Ability_Drone_Liban>(); ASW.enabled = true; Final_Second_Drone_Ability_Liban SDFG = GameObject.Find("Activate Drone second ability").GetComponent <Final_Second_Drone_Ability_Liban>(); SDFG.enabled = true; DHealth.gameObject.SetActive(true); LemarCamera DroneCAMM = GameObject.Find("Drone Camera").GetComponent <LemarCamera>(); DroneCAMM.RotateSpeed = 2; DroneHealth_Script DHEALTHHyhyh = GameObject.FindWithTag("Dronee").GetComponent <DroneHealth_Script>(); DHEALTHHyhyh.enabled = true; Final_Drone_Timer_Liban TIMEII = GameObject.FindWithTag("Dronee").GetComponent <Final_Drone_Timer_Liban>(); TIMEII.enabled = true; } }