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

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

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