public StartButtonHandler(LobbyUiContext context, LobbyUiStorage lobbyUiStorage, UiSoundsManager lobbySoundsManager)
            : base(context)
        {
            lobbyUiContext = context;

            battleLoadingMenu = lobbyUiStorage.battleLoadingMenu;
            matchSearchCanvas = lobbyUiStorage.matchSearchCanvas;
            overlayCanvas     = lobbyUiStorage.overlayCanvas;
            gameViewsRoot     = lobbyUiStorage.gameViewsRoot;

            if (battleLoadingMenu == null)
            {
                throw new NullReferenceException($"{nameof(battleLoadingMenu)} was null");
            }
            if (matchSearchCanvas == null)
            {
                throw new NullReferenceException($"{nameof(matchSearchCanvas)} was null");
            }

            this.lobbySoundsManager = lobbySoundsManager;
        }
Example #2
0
 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));
 }
 public LobbySceneUiEnablingSystem(Contexts context, LobbyUiStorage lobbyUiStorage)
     : base(context.lobbyUi)
 {
     this.lobbyUiStorage = lobbyUiStorage;
 }
Example #4
0
 public LobbySceneUiDisablingSystem(IContext <LobbyUiEntity> context, LobbyUiStorage lobbyUiStorage)
     : base(context)
 {
     this.lobbyUiStorage = lobbyUiStorage;
 }