private void OnTriggerExit(Collider other)
 {
     inTrigger = false;
     OpenLog.DoorClose();
     OpenLog.CloserDoorComplert();
     OpenLog.KeyOk();
 }
Пример #2
0
 public void OnTriggerStay(Collider player)
 {
     if (!isOpen)
     {
         OpenLog.DoorOpen();
         if (player.gameObject.tag == "Player" && Input.GetKeyDown(KeyCode.E))
         {
             isOpen = true;
             audioSource.Play();
             OpenLog.DoorClose();
             boorAni.SetTrigger("Open");
         }
     }
 }
Пример #3
0
    public void OnTriggerStay(Collider player)
    {
        if (!isOpen)
        {
            OpenLog.DoorOpen();
            if (player.gameObject.tag == "Player" && Input.GetKeyDown(KeyCode.E))
            {
                isOpen  = true;
                SE.clip = playSe;
                SE.Play();
                OpenLog.DoorClose();
                ChestAni.SetTrigger("Open");
            }
        }

        if (isOpen && objet != null)
        {
            objet.SetActive(true);
        }
    }