Exemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (PlayerDeathScript.PlayerIsDead() == false)
     {
         DeathMenu.SetActive(false);
     }
     else if (PlayerDeathScript.PlayerIsDead() == true)
     {
         DeathMenu.SetActive(true);
     }
 }
Exemplo n.º 2
0
 /// <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");
         }
     }
 }