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

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

        if (m_isUnLocked && currentButtons < buttonsToUnlock && autoRelock)
        {
            m_isUnLocked = false;
            onDoorLocked.Invoke();
            StartCoroutine(EnableLasers());
        }
    }
예제 #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);
    }