Esempio n. 1
0
 // Update is called once per frame
 void Update()
 {
     if (!monster.Alive())
     {
         monster.player.EndMode();
     }
 }
Esempio n. 2
0
    private void OnTriggerStay(Collider other)
    {
        if (other.CompareTag("Player") && ((monsterToKill == null || !monsterToKill.Alive()) && (monsterToBlock == null || monsterToBlock.GetMonsterIn())))
        {
            other.gameObject.GetComponentInParent <ScriptPerson>().DisplayInfo("Press E");

            if (Input.GetKey(KeyCode.E))
            {
                doorToUse.Use();

                if (loadNewScene)
                {
                    other.GetComponent <LoadManager>().LoadNextScene();
                    loadNewScene = false;
                }
            }
        }
    }