public void ShowOneResource(PurchaseModel purchaseModel) { DisableLobbyUi(); SceneManager.LoadScene("2dLootboxScene", LoadSceneMode.Additive); SceneManager.sceneUnloaded += OneResourceSceneClosed; ResourcesAccrualStorage.Instance.Clear(); var resourceModel = new ResourceModelMapper().Map(purchaseModel); ResourcesAccrualStorage.Instance.SetResourcesModels(new List <ResourceModel>() { resourceModel }); ResourcesAccrualStorage.Instance.SetNoLootboxNeeded(); lobbyEcsController.ClosePurchaseConfirmationWindow(); lobbyEcsController.CloseShopLayer(); cts?.Cancel(); cts = new CancellationTokenSource(); lobbyModelDownloadingTask = new LobbyModelLoader().Load(cts.Token); }
public void ShowError(SectionTypeEnum sectionTypeEnum) { //скрыть меню подтверждения покупки lobbyEcsController.ClosePurchaseConfirmationWindow(); //начать перелистывать на раздел с валютой scrollViewSmoothMovementBehaviour.StartMovement(sectionTypeEnum); //todo показать всплывающий текст ошибки switch (sectionTypeEnum) { case SectionTypeEnum.SoftCurrency: textTooltip.Show("Not enough coins."); break; case SectionTypeEnum.HardCurrency: textTooltip.Show("Not enough gems."); break; default: throw new ArgumentOutOfRangeException(nameof(sectionTypeEnum), sectionTypeEnum, null); } }
private void CreateHideWindowMessage() { lobbyEcsController.ClosePurchaseConfirmationWindow(); }