Beispiel #1
0
    private void OnLevelWasLoaded(int level)
    {
        _scoreDisplay = FindObjectOfType <ScoreDisplay>();
        _doneButton   = FindObjectOfType <DoneButton>();

        _requiredReceivers.Clear();
        _requiredReceivers.AddRange(FindObjectsOfType <SignalReceiver>());
        foreach (var receiver in _requiredReceivers)
        {
            receiver.OnReceiveStatusChanged.AddListener(CheckCompletion);
        }

        _levelCompleteScreen = FindObjectOfType <LevelCompleteScreen>();

        _scoreDisplay.SetLevelTitle(ActiveLevelId, _activeLevel.sceneTitle);

        _doneButton.Deactivate();
    }