예제 #1
0
    public void UpdateScreen()
    {
        foreach (EscapePodModule module in _modules) //Return from the method if any module hasn't been fully repaired
        {
            if (!module.Repaired())
            {
                foreach (EscapePodModule module2 in _modules)
                {
                    module2.ShowText();
                }

                return;
            }
        }

        foreach (EscapePodModule module in _modules) //Will only run if all modules have been fully repaired, tells each module to hide its text on the canvas
        {
            module.HideText();
        }

        _background.color = _repairedBackgroundColor;
        _screenText.text  = _fullyRepairedText;
        _doors.CloseLockDisable();
        _invisibleWall.SetActive(true);
        _engine.Enable();
    }
예제 #2
0
    public void CloseLockDisable()
    {
        if (_master)
        {
            _master.CloseLockDisable();
            return;
        }

        if (_coroutine != null)
        {
            StopCoroutine(_coroutine);
        }

        foreach (DoorButton slave in _slaves)
        {
            slave._enabled = false;
        }

        Lock();
        _passcard  = "DeadLock";
        _coroutine = StartCoroutine(Close());
        _enabled   = false;
        SetCanvas();
    }