Exemplo n.º 1
0
 public PopupManagers(IPopupGameMenu popupGameMenu, IPopupInventory popupInventory, IPopupEvent popupEvent, IPopupPlayers popupPlayers,
                      IPopupDescriptionCard popupDescriptionCard, IPopupPlaceInSlot popupPlaceInSlot, IPopupRewardEvent popupRewardEvent)
 {
     PopupGameMenu        = popupGameMenu;
     PopupInventory       = popupInventory;
     PopupEvent           = popupEvent;
     PopupPlayers         = popupPlayers;
     PopupDescriptionCard = popupDescriptionCard;
     PopupPlaceInSlot     = popupPlaceInSlot;
     PopupRewardEvent     = popupRewardEvent;
 }
Exemplo n.º 2
0
    void Start()
   {
       _publisher = new Publisher();

       _saveManager = new SaveManager();
       _animaManager = new AnimaManager();
       _objectLoader = new ObjectLoader();
       _configurateManager = new ConfigurateManager();

       _objectStorage = new ObjectStorage(_objectLoader,_configurateManager);
       _tokenRewardManager = new TokenRewardManager(_publisher, _animaManager, _objectStorage,_configurateManager);
       _audioManager = new AudioManager(_objectStorage, _coroutiner);
       _barsPlayerManager = new BarsPlayerManager(_objectStorage);

       _inventoryManager = new InventoryManager(_objectStorage, _publisher, _coroutiner,_configurateManager);
       
       _gameStageManager = new GameStageManager(_publisher, _coroutiner);
       _gameManager = new GameManager(_publisher, _animaManager, _objectStorage, _coroutiner,_inventoryManager,_configurateManager);
       _enemyManager = new EnemyManager(_publisher, _coroutiner,_animaManager,_objectStorage, _configurateManager);
       _alliesManager = new AlliesManager(_coroutiner, _configurateManager);
       _playersManager = new PlayersManager(_publisher,_animaManager, _tokenRewardManager);
       _barsEnemyManager = new BarsEnemyManager(_enemyManager, _publisher);
       _activateCardManager = new ActivateCardManager(_publisher, _barsPlayerManager,_enemyManager);
       _targetManager = new TargetManager(_publisher, _animaManager, _activateCardManager, _enemyManager);
       _deckManager = new DeckManager(_objectStorage,_inventoryManager,_animaManager,_publisher,_coroutiner, _targetManager,_configurateManager);
       
       _popupEvent = new PopupEvent(_objectStorage,_publisher,_animaManager,_coroutiner, _configurateManager);
       _popupGameMenu = new PopupGameMenu(_objectStorage, _publisher, _animaManager,_coroutiner);
       _popupInventory = new PopupInventory(_inventoryManager, _animaManager);
       _popupPlaceInSlot = new PopupPlaceInSlot(_publisher);
       _popupPlayers = new PopupPlayers(_animaManager, _objectStorage, _publisher, _configurateManager);
       //_descriptionCardPopup = new PopupDescriptionCard(_popupDescriptionCard);
       _popupDescriptionCard = new PopupDescriptionCard(_coroutiner,_animaManager);
       _popupRewardEvent = new PopupRewardEvent(_publisher, _objectStorage, _configurateManager, _coroutiner);
       
       _publisher.AddSubscriber((ISubscriber) _gameManager);
       _publisher.AddSubscriber((ISubscriber) _inventoryManager);
       _publisher.AddSubscriber((ISubscriber) _gameStageManager);
       _publisher.AddSubscriber((ISubscriber) _activateCardManager);
       _publisher.AddSubscriber((ISubscriber) _barsPlayerManager);
       _publisher.AddSubscriber((ISubscriber) _barsEnemyManager);
       _publisher.AddSubscriber((ISubscriber) _enemyManager);
       _publisher.AddSubscriber((ISubscriber) _alliesManager);
       _publisher.AddSubscriber((ISubscriber) _playersManager);
       _publisher.AddSubscriber((ISubscriber) _deckManager);
       _publisher.AddSubscriber((ISubscriber) _targetManager);
       _publisher.AddSubscriber((ISubscriber) _audioManager);
       _publisher.AddSubscriber((ISubscriber) _tokenRewardManager);
       
       _publisher.AddSubscriber((ISubscriber) _popupGameMenu);
       _publisher.AddSubscriber((ISubscriber) _popupInventory);
       _publisher.AddSubscriber((ISubscriber) _popupEvent);
       _publisher.AddSubscriber((ISubscriber) _popupPlayers);
       _publisher.AddSubscriber((ISubscriber) _popupDescriptionCard);
       _publisher.AddSubscriber((ISubscriber) _popupRewardEvent);
       _publisher.AddSubscriber((ISubscriber) _popupPlaceInSlot);
       
       _baseManagers = new BaseManagers(_saveManager,_animaManager,_publisher,_objectStorage,_configurateManager,_coroutiner, _audioManager);
       _gameManagers = new GameManagers(_gameManager, _activateCardManager, _barsPlayerManager, _barsEnemyManager, 
           _enemyManager, _alliesManager,  _playersManager, _deckManager, _inventoryManager, _targetManager, _tokenRewardManager);
       _popupManagers = new PopupManagers(_popupGameMenu,_popupInventory, _popupEvent, _popupPlayers, _popupDescriptionCard,_popupPlaceInSlot, _popupRewardEvent);
       
       
       _logicManager = new LogicManager(_baseManagers,_gameManagers, _popupManagers);
       _loadManager = new LoadManager(_logicManager);
       //-------------------Делаем переход в сцену "Меню"
       _loadManager.Navigate(SceneTypeEnum.Bootstrapper, SceneTypeEnum.Menu, CustomObject.Empty);
   }