Пример #1
0
    public void Interact()
    {
        CancelInvoke();
        door.OpenByPresentAction();

        Invoke("CloseDoor", openForTime);

        ui.ShowDoorOpenForSeconds(openForTime);
    }
Пример #2
0
 private void OnTriggerEnter(Collider other)
 {
     Debug.Log(other.gameObject.layer);
     Debug.Log(playerLayer);
     if (other.gameObject.layer == playerLayer)
     {
         activated = true;
         door.OpenByPresentAction();
         ui.ShowDoorOpenPermanentNotification();
     }
 }
Пример #3
0
    /*private void OnTriggerExit(Collider other) {
     *      CloseDoor();
     * }*/

    public void Interact(Player player)
    {
        if (player.HasKeyCard(type))
        {
            CancelInvoke();
            door.OpenByPresentAction();
            Invoke("CloseDoor", openForTime);
        }
        else
        {
            Debug.Log("You do not have the correct keycard to open this door");
        }
    }