private void Update() { if (guardDroneManager == null) { guardDroneManager = GameObject.FindGameObjectWithTag("GuardDrone").GetComponent <GuardDroneManager>(); } if (stunActivated) { StartCoroutine(Stunned()); } FogStatus(); timeLeft -= Time.deltaTime; }
private void Update() { if (guardDroneScript == null) { guardDroneScript = GameObject.FindGameObjectWithTag("GuardDrone").GetComponent <GuardDroneManager>(); } foreach (Transform thiefTrams in foundThiefs) { if (!hasBeenActivated) { if (photonView.isMine) { guardDroneScript.scriptFromAlarm.Add(this.GetComponent <AlarmScript>()); alarmActivated = true; StartCoroutine(WaitToGetRid()); hasBeenActivated = true; } } } }