public void Lock()
 {
     if (m_isUnLocked)
     {
         m_isUnLocked = false;
         onDoorLocked.Invoke();
         StartCoroutine(EnableLasers());
     }
 }
 public void Unlock()
 {
     if (!m_isUnLocked)
     {
         m_isUnLocked = true;
         onDoorUnlocked.Invoke();
         StartCoroutine(DisableLasers());
     }
 }
Beispiel #3
0
    public void Unlock()
    {
        currentButtons++;

        if (!m_isUnLocked && currentButtons >= buttonsToUnlock)
        {
            m_isUnLocked = true;
            onDoorUnlocked.Invoke();
            StartCoroutine(DisableLasers());
        }
    }
Beispiel #4
0
    public void Lock()
    {
        currentButtons--;

        if (m_isUnLocked && currentButtons < buttonsToUnlock && autoRelock)
        {
            m_isUnLocked = false;
            onDoorLocked.Invoke();
            StartCoroutine(EnableLasers());
        }
    }
Beispiel #5
0
    /// <summary>
    /// Wait for the animations to play before opening the door.
    /// </summary>
    /// <returns>The current ienumerator step.</returns>
    IEnumerator WaitForDoorToOpen()
    {
        yield return(new WaitForSeconds(m_ExitDoorOpeningClip.length + m_ClipLengthExtraDelay));

        m_DoorUnlockedEvent.Invoke(this);
    }