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()); } }
public void Unlock() { currentButtons++; if (!m_isUnLocked && currentButtons >= buttonsToUnlock) { m_isUnLocked = true; onDoorUnlocked.Invoke(); StartCoroutine(DisableLasers()); } }
public void Lock() { currentButtons--; if (m_isUnLocked && currentButtons < buttonsToUnlock && autoRelock) { m_isUnLocked = false; onDoorLocked.Invoke(); StartCoroutine(EnableLasers()); } }
/// <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); }