Exemplo n.º 1
0
    void OnFuncFinished(string type)
    {
        if (!_currentAmountOfFunctionsTriggeredPerListener.ContainsKey(type))
        {
            _currentAmountOfFunctionsTriggeredPerListener.Add(type, 0);
        }

        _currentAmountOfFunctionsTriggeredPerListener[type]++;

        if (_currentAmountOfFunctionsTriggeredPerListener[type] == _amountOfFunctionPerListener[type])
        {
            if (_outputButton != null)
            {
                foreach (var key in _buttonListeners.Keys)
                {
                    _outputButton.onClick.RemoveListener(_buttonListeners[key]);
                }
                _outputButton    = null;
                _buttonListeners = null;
            }
            _tutoGroup.OnOutputFinished();
        }
    }