private void OnDisable()
 {
     _coroutineQueue.StopQueue();
     _coroutineQueue.CancelFutureSubcoroutines();
     _coroutineQueue.StopForcedSolve();
     StopAllCoroutines();
 }
Exemple #2
0
 public void OnDisable()
 {
     CoroutineQueue.StopQueue();
     CoroutineQueue.CancelFutureSubcoroutines();
     CoroutineQueue.StopForcedSolve();
     StopAllCoroutines();
 }
    private void OnDisable()
    {
        CoroutineQueue.StopQueue();
        CoroutineQueue.CancelFutureSubcoroutines();
        CoroutineQueue.StopForcedSolve();
        StopAllCoroutines();

        LeaderboardsEnabled = true;
    }
    private IEnumerator StopEveryCoroutine()
    {
        yield return new WaitForSeconds(2.0f);

        _coroutineQueue.StopQueue();
        _coroutineQueue.CancelFutureSubcoroutines();
        StopAllCoroutines();
    }
    private IEnumerator InstantlySolveModule(string reason, params object[] args)
    {
        BombModule.LogFormat("Instantly solving the module because the following error happened:");
        BombModule.LogFormat(reason, args);
        Movements.CancelFutureSubcoroutines();
        Movements.StopQueue();

        //Kill the Souvenir questions because of crash. This will make Souvenir ignore this Morse-A-Maze instance.
        _souvenirQuestionEndingLocation   = null;
        _souvenirQuestionStartingLocation = null;
        _souvenirQuestionWordPlaying      = null;
        _souvenirQuestionWordList         = null;

        _solved = true;
        if (!FakeStatusLight.HasFakeStatusLightFailed)
        {
            StartCoroutine(MoveStatusLightToCorner());
            FakeStatusLight.PassColor = StatusLightState.Green;
            HandleModulePass();
        }
        else
        {
            BombModule.HandlePass();
        }

        foreach (var location in Locations)
        {
            location.gameObject.SetActive(false);
        }

        yield return(new WaitForSecondsRealtime(2));

        _unicorn = true;
        for (var x = 0; x < 6; x++)
        {
            for (var y = 0; y < 6; y++)
            {
                SetWall(x, y, false, true);
                SetWall(x, y, true, true);
            }
        }
        yield return(new WaitForSecondsRealtime(8));

        StopAllCoroutines();
    }