// Update is called once per frame void Update() { if (PlayerDeathScript.PlayerIsDead() == false) { DeathMenu.SetActive(false); } else if (PlayerDeathScript.PlayerIsDead() == true) { DeathMenu.SetActive(true); } }
/// <summary> /// Check if the stalker got the player /// </summary> void OnTriggerEnter(Collider hit) { if (hit.gameObject.tag == "Player") { if (behaviorScript.typePersonBehavior == TypePersonBehavior.Stalker) { PlayerDeath playerDeathScript = hit.transform.gameObject.GetComponent <PlayerDeath>(); playerDeathScript.PlayerIsDead(); // DEBUG Debug.Log("stalker got the player"); } } }