private void OnInstaller(CollectablePool collectablePool)
        {
            _collectablePool      = collectablePool;
            _currentLevelIncrease = 0;
            _isActive             = true;

            MessageBroker.Default.Receive <int>().Subscribe(GetCurrentLevelDetails);
            MessageBroker.Default.Receive <LevelEvent>().Subscribe((level) => _isActive = true);
        }
Ejemplo n.º 2
0
        private void OnInstaller(CollectablePool collectablePool, LevelManager levelManager, AssetManager assetManager,
                                 HoleBase holeBase)
        {
            _holeBase        = holeBase;
            _collectablePool = collectablePool;
            _levelManager    = levelManager;
            _assetManager    = assetManager;
            _currentLevel    = 1;

            MessageBroker.Default.Receive <LevelEvent>().Subscribe((level) =>
            {
                if (level == LevelEvent.LEVEL_SUCCESSFUL)
                {
                    GenerateNewLevel();
                }
                else
                {
                    _currentLevel--;
                    GenerateNewLevel();
                }
            });
        }