public ShedController(
            [NotNull] IRepository <int, IUpgradeHandler> upgradeHandlersRepository,
            [NotNull] IRepository <int, IUpgradeHandler> defaultHandlers,
            [NotNull] IRepository <int, IItem> itemsRepository,
            [NotNull] IInventoryController inventoryController,
            [NotNull] IUpgradable upgradable)
        {
            _upgradeHandlersRepository =
                upgradeHandlersRepository ??
                throw new ArgumentNullException(nameof(upgradeHandlersRepository));

            _defaultHandlers =
                defaultHandlers ??
                throw new ArgumentNullException(nameof(defaultHandlers));

            _itemsRepository =
                itemsRepository ??
                throw new ArgumentNullException(nameof(itemsRepository));

            _inventoryController =
                inventoryController ??
                throw new ArgumentNullException(nameof(inventoryController));

            _upgradable =
                upgradable ??
                throw new ArgumentNullException(nameof(upgradable));

            _inventoryController.HideInventory();
        }
Esempio n. 2
0
 public void Exit()
 {
     _inventoryController.HideInventory();
     UpgradeCarWithEquippedItems(_upgradable, _inventoryController.GetEquippedItems(),
                                 _upgradeHandlersRepository.Collection);
 }