Esempio n. 1
0
    private void OnEnable()
    {
        _timer = FindObjectOfType <MissionTimer>();
        if (_timer != null)
        {
            _timer.StartTimer(timeLimitInSeconds);
            _timer.Expired += MissionTimeIsUp;
        }

        _escape = FindObjectOfType <Escape>();
        _escape.PlayerEscaped += EscapeFromMission;

        _worryHub = gameObject.FindOrCreate <WorryHub>();
        _worryHub.WorryOverhead += PlayerCaught;
    }