private void Awake() { shopUiSpawner = FindObjectOfType <ShopUiSpawner>() ?? throw new NullReferenceException(nameof(ShopUiSpawner)); purchasingService = FindObjectOfType <PurchasingService>() ?? throw new NullReferenceException(nameof(PurchasingService)); lobbyEcsController = FindObjectOfType <LobbyEcsController>() ?? throw new NullReferenceException(nameof(PurchasingService)); }
public ShopUiLayerEnablingSystem(IContext <LobbyUiEntity> context, UiLayersStorage uiLayersStorage, ShopUiStorage shopUiStorage, LobbyLayoutSwitcher lobbyLayoutSwitcher, ShopUiSpawner shopUiSpawner) : base(context) { this.uiLayersStorage = uiLayersStorage; this.shopUiStorage = shopUiStorage; this.lobbyLayoutSwitcher = lobbyLayoutSwitcher; this.shopUiSpawner = shopUiSpawner; }
private void Awake() { lobbyUiStorage = FindObjectOfType <LobbyUiStorage>() ?? throw new NullReferenceException(nameof(LobbyUiStorage)); uiLayersStorage = FindObjectOfType <UiLayersStorage>() ?? throw new NullReferenceException(nameof(UiLayersStorage)); shopUiStorage = FindObjectOfType <ShopUiStorage>() ?? throw new NullReferenceException(nameof(ShopUiStorage)); movingAwardsUiStorage = FindObjectOfType <MovingAwardsUiElementsStorage>() ?? throw new NullReferenceException(nameof(MovingAwardsUiElementsStorage)); warshipsUiStorage = FindObjectOfType <WarshipsUiStorage>() ?? throw new NullReferenceException(nameof(WarshipsUiStorage)); shopUiSpawner = FindObjectOfType <ShopUiSpawner>() ?? throw new NullReferenceException(nameof(shopUiSpawner)); lobbySceneSwitcher = FindObjectOfType <LobbySceneSwitcher>() ?? throw new NullReferenceException(nameof(lobbySceneSwitcher)); inGameCurrencyPaymaster = FindObjectOfType <InGameCurrencyPaymaster>() ?? throw new NullReferenceException(nameof(inGameCurrencyPaymaster)); textTooltip = FindObjectOfType <TextTooltip>() ?? throw new NullReferenceException(nameof(TextTooltip)); }